This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: [ECOS] Re: question about bridging code.
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Daniel Néri <daniel dot neri at sigicom dot com>
- Cc: ecos-discuss at sources dot redhat dot com,eCos Patches List <ecos-patches at sources dot redhat dot com>
- Date: Thu, 30 Jan 2003 15:37:44 +0000
- Subject: Re: [ECOS] Re: question about bridging code.
- References: <NDBBICPJMKAJHBBNFIGPCECNGNAA.bguckel@cisco.com> <wkbs1ybra4.fsf@sigicom.com>
Daniel Néri wrote:
As far as I can see, this bug still exists in recent source. Though it
was fixed in the original code two years ago:
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/if_bridge.c.diff?r1=1.48&r2=1.49&f=h
I've made this change.
Hm.. it seems the bridge stuff isn't in the FreeBSD stack. That would be
something that needs to be added before we could ever drop the old stack :-|.
Jifl
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/tcpip/current/ChangeLog,v
retrieving revision 1.41
diff -u -5 -p -r1.41 ChangeLog
--- ChangeLog 22 Dec 2002 11:03:52 -0000 1.41
+++ ChangeLog 30 Jan 2003 15:36:52 -0000
@@ -1,5 +1,11 @@
+2003-01-30 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * src/sys/net/if_bridge.c (bridge_input): Learn source host addr,
+ not dest host addr.
+ Fix pointed to by Daniel Néri.
+
2002-12-14 Nick Garnett <nickg@ecoscentric.com>
* src/sys/netinet/tcp_usrreq.c (tcp_usrreq): Rearranged ifndef on
PRU_SENSE case to keep the case in the switch and let it return a
sensible result. Otherwise a stat() on a socket causes a panic().
Index: src/sys/net/if_bridge.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/tcpip/current/src/sys/net/if_bridge.c,v
retrieving revision 1.8
diff -u -5 -p -r1.8 if_bridge.c
--- src/sys/net/if_bridge.c 20 May 2002 22:25:20 -0000 1.8
+++ src/sys/net/if_bridge.c 30 Jan 2003 15:36:54 -0000
@@ -1168,11 +1168,11 @@ bridge_input(ifp, eh, m)
continue;
ac = (struct arpcom *)ifl->ifp;
if (bcmp(ac->ac_enaddr, eh->ether_dhost, ETHER_ADDR_LEN) == 0) {
if (ifl->bif_flags & IFBIF_LEARNING)
bridge_rtupdate(sc,
- (struct ether_addr *)&eh->ether_dhost,
+ (struct ether_addr *)&eh->ether_shost,
ifp, 0, IFBAF_DYNAMIC);
m->m_pkthdr.rcvif = ifl->ifp;
return (m);
}
if (bcmp(ac->ac_enaddr, eh->ether_shost, ETHER_ADDR_LEN) == 0) {
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine