mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-21 23:56:59 +08:00
fix bug in RA MTU validation
Also fix that RA could change IPv4 MTU. See bug #53696 Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
@@ -333,6 +333,10 @@ struct netif {
|
||||
#endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/
|
||||
/** maximum transfer unit (in bytes) */
|
||||
u16_t mtu;
|
||||
#if LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES
|
||||
/** maximum transfer unit (in bytes), updated by RA */
|
||||
u16_t mtu6;
|
||||
#endif /* LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES */
|
||||
/** link level hardware address of this interface */
|
||||
u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
|
||||
/** number of bytes used in hwaddr */
|
||||
@@ -529,6 +533,11 @@ err_t netif_add_ip6_address(struct netif *netif, const ip6_addr_t *ip6addr, s8_t
|
||||
#else /* !LWIP_IPV6_ADDRESS_LIFETIMES */
|
||||
#define netif_ip6_addr_isstatic(netif, i) (1) /* all addresses are static */
|
||||
#endif /* !LWIP_IPV6_ADDRESS_LIFETIMES */
|
||||
#if LWIP_ND6_ALLOW_RA_UPDATES
|
||||
#define netif_mtu6(netif) ((netif)->mtu6)
|
||||
#else /* LWIP_ND6_ALLOW_RA_UPDATES */
|
||||
#define netif_mtu6(netif) ((netif)->mtu)
|
||||
#endif /* LWIP_ND6_ALLOW_RA_UPDATES */
|
||||
#endif /* LWIP_IPV6 */
|
||||
|
||||
#if LWIP_NETIF_USE_HINTS
|
||||
|
||||
Reference in New Issue
Block a user