Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Oct 2009 19:44:45 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r197811 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet
Message-ID:  <200910061944.n96JijDv062097@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Tue Oct  6 19:44:44 2009
New Revision: 197811
URL: http://svn.freebsd.org/changeset/base/197811

Log:
  MFC	197695
  
  Previously, if an address alias is configured on an interface, and
  this address alias has a prefix matching that of another address
  configured on the same interface, then the ARP entry for the alias
  is not deleted from the ARP table when that address alias is removed.
  This patch fixes the aforementioned issue.
  
  PR:		kern/139113
  Reviewed by:	bz
  Approved by:	re

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netinet/in.c

Modified: stable/8/sys/netinet/in.c
==============================================================================
--- stable/8/sys/netinet/in.c	Tue Oct  6 18:47:02 2009	(r197810)
+++ stable/8/sys/netinet/in.c	Tue Oct  6 19:44:44 2009	(r197811)
@@ -1060,6 +1060,8 @@ in_scrubprefix(struct in_ifaddr *target)
 	    !(target->ia_ifp->if_flags & IFF_LOOPBACK)) {
 		error = ifa_del_loopback_route((struct ifaddr *)target,
 				       (struct sockaddr *)&target->ia_addr);
+		/* remove arp cache */
+		arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
 	}
 
 	if ((target->ia_flags & IFA_ROUTE) == 0) {
@@ -1082,8 +1084,6 @@ in_scrubprefix(struct in_ifaddr *target)
 		prefix = target->ia_addr.sin_addr;
 		mask = target->ia_sockmask.sin_addr;
 		prefix.s_addr &= mask.s_addr;
-		/* remove arp cache */
-		arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
 	}
 
 	IN_IFADDR_RLOCK();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910061944.n96JijDv062097>