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:
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
* opt.h: Disable ETHARP_TRUST_IP_MAC by default since it slows down packet
reception and is not really necessary

View File

@ -452,19 +452,21 @@ void netif_set_up(struct netif *netif)
NETIF_STATUS_CALLBACK(netif);
if (netif->flags & NETIF_FLAG_LINK_UP) {
#if LWIP_ARP
/* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */
if (netif->flags & NETIF_FLAG_ETHARP) {
etharp_gratuitous(netif);
}
/* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */
if (netif->flags & (NETIF_FLAG_ETHARP)) {
etharp_gratuitous(netif);
}
#endif /* LWIP_ARP */
#if LWIP_IGMP
/* resend IGMP memberships */
if (netif->flags & NETIF_FLAG_IGMP) {
igmp_report_groups( netif);
}
/* resend IGMP memberships */
if (netif->flags & NETIF_FLAG_IGMP) {
igmp_report_groups( netif);
}
#endif /* LWIP_IGMP */
}
}
}