mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00:00
Fix bug #56136: The netif->mtu6 was updated by Router Advertisement abnomally
Using patch from Gao Quingahui plus improvement
This commit is contained in:
parent
ff17530997
commit
0255106d55
@ -701,7 +701,7 @@ nd6_input(struct pbuf *p, struct netif *inp)
|
|||||||
#if LWIP_ND6_ALLOW_RA_UPDATES
|
#if LWIP_ND6_ALLOW_RA_UPDATES
|
||||||
if (inp->mtu) {
|
if (inp->mtu) {
|
||||||
/* don't set the mtu for IPv6 higher than the netif driver supports */
|
/* don't set the mtu for IPv6 higher than the netif driver supports */
|
||||||
inp->mtu6 = LWIP_MIN(inp->mtu, (u16_t)mtu32);
|
inp->mtu6 = LWIP_MIN(LWIP_MIN(inp->mtu, inp->mtu6), (u16_t)mtu32);
|
||||||
} else {
|
} else {
|
||||||
inp->mtu6 = (u16_t)mtu32;
|
inp->mtu6 = (u16_t)mtu32;
|
||||||
}
|
}
|
||||||
|
@ -1058,6 +1058,10 @@ netif_set_link_down(struct netif *netif)
|
|||||||
acd_network_changed_link_down(netif);
|
acd_network_changed_link_down(netif);
|
||||||
#endif /* LWIP_ACD */
|
#endif /* LWIP_ACD */
|
||||||
|
|
||||||
|
#if LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES
|
||||||
|
netif->mtu6 = netif->mtu;
|
||||||
|
#endif
|
||||||
|
|
||||||
NETIF_LINK_CALLBACK(netif);
|
NETIF_LINK_CALLBACK(netif);
|
||||||
#if LWIP_NETIF_EXT_STATUS_CALLBACK
|
#if LWIP_NETIF_EXT_STATUS_CALLBACK
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user