Merge branch 'bugfix/fix_ipv6_maxresp_error' into 'release/v2.x.x'

lfix LIPv6 maxresp calculation error

See merge request sdk/ESP8266_RTOS_SDK!1052
This commit is contained in:
Dong Heng
2019-08-14 10:53:18 +08:00
2 changed files with 4 additions and 1 deletions

Binary file not shown.

View File

@ -499,7 +499,10 @@ mld6_delayed_report(struct mld_group *group, u16_t maxresp)
#ifdef LWIP_RAND
/* Randomize maxresp. (if LWIP_RAND is supported) */
maxresp = (LWIP_RAND() % (maxresp - 1)) + 1;
maxresp = LWIP_RAND() % maxresp;
if (maxresp == 0) {
maxresp = 1;
}
#endif /* LWIP_RAND */
/* Apply timer value if no report has been scheduled already. */