arp: Don't send gratuitous ARP for devices that are not ethernet typed
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 15 Mar 2012 10:22:20 +0000 (18:22 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 15 Mar 2012 10:22:20 +0000 (18:22 +0800)
Reported-by: alexh@ and swildner@
sys/netinet/if_ether.c

index a795656..c60ec8e 100644 (file)
@@ -1246,6 +1246,8 @@ static void
 arp_ifaddr(void *arg __unused, struct ifnet *ifp,
     enum ifaddr_event event, struct ifaddr *ifa)
 {
+       if (ifa->ifa_rtrequest != arp_rtrequest) /* XXX need a generic way */
+               return;
        if (ifa->ifa_addr->sa_family != AF_INET)
                return;
        if (event == IFADDR_EVENT_DELETE)