Date: Tue, 23 Dec 2008 03:33:33 +0000 (UTC) From: Qing Li <qingli@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186411 - head/sys/netinet Message-ID: <200812230333.mBN3XX3D079470@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: qingli Date: Tue Dec 23 03:33:32 2008 New Revision: 186411 URL: http://svn.freebsd.org/changeset/base/186411 Log: Don't create a bogus ARP entry for 0.0.0.0. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Tue Dec 23 02:19:14 2008 (r186410) +++ head/sys/netinet/if_ether.c Tue Dec 23 03:33:32 2008 (r186411) @@ -758,23 +758,24 @@ arp_ifinit(struct ifnet *ifp, struct ifa { struct llentry *lle; - if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY) + if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY) { arprequest(ifp, &IA_SIN(ifa)->sin_addr, &IA_SIN(ifa)->sin_addr, IF_LLADDR(ifp)); - /* - * interface address is considered static entry - * because the output of the arp utility shows - * that L2 entry as permanent - */ - IF_AFDATA_LOCK(ifp); - lle = lla_lookup(LLTABLE(ifp), (LLE_CREATE | LLE_IFADDR | LLE_STATIC), - (struct sockaddr *)IA_SIN(ifa)); - IF_AFDATA_UNLOCK(ifp); - if (lle == NULL) - log(LOG_INFO, "arp_ifinit: cannot create arp " - "entry for interface address\n"); - else - LLE_RUNLOCK(lle); + /* + * interface address is considered static entry + * because the output of the arp utility shows + * that L2 entry as permanent + */ + IF_AFDATA_LOCK(ifp); + lle = lla_lookup(LLTABLE(ifp), (LLE_CREATE | LLE_IFADDR | LLE_STATIC), + (struct sockaddr *)IA_SIN(ifa)); + IF_AFDATA_UNLOCK(ifp); + if (lle == NULL) + log(LOG_INFO, "arp_ifinit: cannot create arp " + "entry for interface address\n"); + else + LLE_RUNLOCK(lle); + } ifa->ifa_rtrequest = NULL; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812230333.mBN3XX3D079470>