Date: Tue, 7 Mar 2006 15:54:10 +1300 From: Andrew Thompson <thompsa@freebsd.org> To: Nik Lam <freebsdnik@j2d.lam.net.au> Cc: freebsd-net@freebsd.org Subject: Re: if_bridge steals IP address of non-member interface Message-ID: <20060307025410.GA55053@heff.fud.org.nz> In-Reply-To: <440CEBDE.5090602@j2d.lam.net.au> References: <440CEBDE.5090602@j2d.lam.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 07, 2006 at 01:11:42PM +1100, Nik Lam wrote: > I'm not sure if what I'm seeing is an artefact of me doing something > unusual with my design or if there is a bug in if_bridge. > > I'm dividing my LAN into two parts using a pair of intel pro 1000 (em) > interfaces in an if_bridge bridge. I've configured this bridge with STP > (802.1d) although I don't think this should be the cause of the > problem. On the same host which is doing the bridging, I've got another > interface (fxp0) which is configured "normally", i.e. it has an IP > address on the subnet which the bridge divides. > > Generally this setup works fine, however every now and then I find that > the bridge is answering ARP who-has queries for the IP address assigned > to fxp0. Can you try this patch. cheers, Andrew Index: if_ether.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v retrieving revision 1.150 diff -u -p -r1.150 if_ether.c --- if_ether.c 31 Jan 2006 21:29:41 -0000 1.150 +++ if_ether.c 7 Mar 2006 02:52:42 -0000 @@ -631,7 +631,7 @@ in_arpinput(m) * XXX: This is really ugly! */ LIST_FOREACH(ia, INADDR_HASH(itaddr.s_addr), ia_hash) { - if (((bridged && ia->ia_ifp->if_type != IFT_BRIDGE) || + if (((bridged && ia->ia_ifp->if_bridge != NULL) || (ia->ia_ifp == ifp)) && itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) goto match; @@ -645,7 +645,7 @@ in_arpinput(m) #endif } LIST_FOREACH(ia, INADDR_HASH(isaddr.s_addr), ia_hash) - if (((bridged && ia->ia_ifp->if_type != IFT_BRIDGE) || + if (((bridged && ia->ia_ifp->if_bridge != NULL) || (ia->ia_ifp == ifp)) && isaddr.s_addr == ia->ia_addr.sin_addr.s_addr) goto match;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060307025410.GA55053>