From owner-freebsd-net Mon Feb 5 13: 8:42 2001 Delivered-To: freebsd-net@freebsd.org Received: from syncopation-03.iinet.net.au (syncopation-03.iinet.net.au [203.59.24.49]) by hub.freebsd.org (Postfix) with SMTP id 2066437B401 for ; Mon, 5 Feb 2001 13:08:15 -0800 (PST) Received: (qmail 24493 invoked by uid 666); 5 Feb 2001 21:15:53 -0000 Received: from reggae-14-42.nv.iinet.net.au (HELO elischer.org) (203.59.77.42) by mail.m.iinet.net.au with SMTP; 5 Feb 2001 21:15:53 -0000 Message-ID: <3A7F0806.9B81D98@elischer.org> Date: Mon, 05 Feb 2001 12:07:34 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Luigi Rizzo Cc: Patrick Bihan-Faou , freebsd-net@FreeBSD.ORG, richw@webcom.com, julian@FreeBSD.ORG Subject: Re: BRIDGE breaks ARP? (more info) References: <200102052011.f15KBJb24985@iguana.aciri.org> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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