From owner-freebsd-net Mon Feb 5 13:14: 6 2001 Delivered-To: freebsd-net@freebsd.org Received: from modemcable101.200-201-24.mtl.mc.videotron.ca (modemcable026.106-200-24.mtl.mc.videotron.ca [24.200.106.26]) by hub.freebsd.org (Postfix) with SMTP id 167B837B491 for ; Mon, 5 Feb 2001 13:13:40 -0800 (PST) Received: (qmail 85295 invoked from network); 5 Feb 2001 21:13:30 -0000 Received: from cognac.local.mindstep.com (HELO cognac) (192.168.10.9) by jacuzzi.local.mindstep.com with SMTP; 5 Feb 2001 21:13:30 -0000 From: "Patrick Bihan-Faou" To: "Julian Elischer" , "Luigi Rizzo" Cc: , , Subject: RE: BRIDGE breaks ARP? (more info) Date: Mon, 5 Feb 2001 16:14:53 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: <3A7F0806.9B81D98@elischer.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ah! Yep this seems to be fixing my problem here. I actually reimplemented Julian's patch on a test system here, but luckily did not get confused by the order of the test (the first test should be if(do_bridge || ...) rather than if (!do_bridge)). To Julian's defence, the use of a #ifdef BRIDGE in one place and $ifndef BRIDGE in the other place was confusing though. Patrick. > -----Original Message----- > From: julian@zeweb.mindstep.com [mailto:julian@zeweb.mindstep.com]On > Behalf Of Julian Elischer > Sent: February 5, 2001 15:08 > To: Luigi Rizzo > Cc: Patrick Bihan-Faou; freebsd-net@FreeBSD.ORG; richw@webcom.com; > julian@FreeBSD.ORG > Subject: Re: BRIDGE breaks ARP? (more info) > > > Ok, mea culpa > > I figured it out.. > Luigi.. does this fix it? > > > > > (void)memcpy(&itaddr, ea->arp_tpa, sizeof (itaddr)); > TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { > #ifdef BRIDGE > /* > * For a bridge, we want to check the address irrespective > * of the receive interface. (This will change slightly > * when we have clusters of interfaces). > */ > #define BRIDGE_TEST (do_bridge) > #else > #define BRIDGE_TEST 0 /* cc will optiise the test away */ > #endif > if ((BRIDGE_TEST) || (ia->ia_ifp == &ac->ac_if)) { > maybe_ia = ia; > if ((itaddr.s_addr == > ia->ia_addr.sin_addr.s_addr) || > (isaddr.s_addr == > ia->ia_addr.sin_addr.s_addr)) { > break; > } > } > } > if (maybe_ia == 0) { > m_freem(m); > return; > } > myaddr = ia ? ia->ia_addr.sin_addr : maybe_ia->ia_addr.sin_addr; > if (!bcmp((caddr_t)ea->arp_sha, (caddr_t)ac->ac_enaddr, > sizeof (ea->arp_sha))) { > m_freem(m); /* it's from me, ignore it. */ > return; > } > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message