diff --git a/CHANGELOG b/CHANGELOG index 0ea3660b..27f86da1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/src/core/netif.c b/src/core/netif.c index a7359bb4..de1959e0 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -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 */ + } } }