svn commit: r217829 - head/sys/netinet

Andrew Thompson thompsa at FreeBSD.org
Tue Jan 25 17:15:23 UTC 2011


Author: thompsa
Date: Tue Jan 25 17:15:23 2011
New Revision: 217829
URL: http://svn.freebsd.org/changeset/base/217829

Log:
  When matching an incoming ARP against a bridge, ensure both interfaces belong
  to the same bridge.
  
  Submitted by:	Alexander Zagrebin

Modified:
  head/sys/netinet/if_ether.c

Modified: head/sys/netinet/if_ether.c
==============================================================================
--- head/sys/netinet/if_ether.c	Tue Jan 25 15:34:07 2011	(r217828)
+++ head/sys/netinet/if_ether.c	Tue Jan 25 17:15:23 2011	(r217829)
@@ -564,7 +564,7 @@ in_arpinput(struct mbuf *m)
 	 */
 	IN_IFADDR_RLOCK();
 	LIST_FOREACH(ia, INADDR_HASH(itaddr.s_addr), ia_hash) {
-		if (((bridged && ia->ia_ifp->if_bridge != NULL) ||
+		if (((bridged && ia->ia_ifp->if_bridge == ifp->if_bridge) ||
 		    ia->ia_ifp == ifp) &&
 		    itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) {
 			ifa_ref(&ia->ia_ifa);
@@ -581,7 +581,7 @@ in_arpinput(struct mbuf *m)
 		}
 	}
 	LIST_FOREACH(ia, INADDR_HASH(isaddr.s_addr), ia_hash)
-		if (((bridged && ia->ia_ifp->if_bridge != NULL) ||
+		if (((bridged && ia->ia_ifp->if_bridge == ifp->if_bridge) ||
 		    ia->ia_ifp == ifp) &&
 		    isaddr.s_addr == ia->ia_addr.sin_addr.s_addr) {
 			ifa_ref(&ia->ia_ifa);


More information about the svn-src-head mailing list