Fixed bug #28877 (Duplicate ARP gratuitous packet with LWIP_NETIF_LINK_CALLBACK set on) by only sending if both link- and admin-status of a netif are up

This commit is contained in:
goldsimon 2010-02-14 20:20:28 +00:00
parent e983865ad5
commit e04e0cb98e
2 changed files with 15 additions and 8 deletions

View File

@ -131,6 +131,11 @@ HISTORY
++ Bugfixes: ++ Bugfixes:
2010-02-14: Simon Goldschmidt
* netif.c: Fixed bug #28877 (Duplicate ARP gratuitous packet with
LWIP_NETIF_LINK_CALLBACK set on) by only sending if both link- and
admin-status of a netif are up
2010-02-14: Simon Goldschmidt 2010-02-14: Simon Goldschmidt
* opt.h: Disable ETHARP_TRUST_IP_MAC by default since it slows down packet * opt.h: Disable ETHARP_TRUST_IP_MAC by default since it slows down packet
reception and is not really necessary reception and is not really necessary

View File

@ -452,9 +452,10 @@ void netif_set_up(struct netif *netif)
NETIF_STATUS_CALLBACK(netif); NETIF_STATUS_CALLBACK(netif);
if (netif->flags & NETIF_FLAG_LINK_UP) {
#if LWIP_ARP #if LWIP_ARP
/* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */
if (netif->flags & NETIF_FLAG_ETHARP) { if (netif->flags & (NETIF_FLAG_ETHARP)) {
etharp_gratuitous(netif); etharp_gratuitous(netif);
} }
#endif /* LWIP_ARP */ #endif /* LWIP_ARP */
@ -467,6 +468,7 @@ void netif_set_up(struct netif *netif)
#endif /* LWIP_IGMP */ #endif /* LWIP_IGMP */
} }
} }
}
/** /**
* Bring an interface down, disabling any traffic processing. * Bring an interface down, disabling any traffic processing.