mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-17 23:27:06 +08:00
fix(lwip): fix LwIP IPv6 maxresp calculation error
When recieving the IPv6 ICMP multicast listener query message, system will crash.
This commit is contained in:
BIN
lib/liblwip.a
BIN
lib/liblwip.a
Binary file not shown.
5
third_party/lwip/core/ipv6/mld6.c
vendored
5
third_party/lwip/core/ipv6/mld6.c
vendored
@ -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. */
|
||||
|
Reference in New Issue
Block a user