From owner-freebsd-current Sat Feb 3 0:49:12 2001 Delivered-To: freebsd-current@freebsd.org Received: from syncopation-01.iinet.net.au (syncopation-01.iinet.net.au [203.59.24.37]) by hub.freebsd.org (Postfix) with SMTP id 675EE37B4EC for ; Sat, 3 Feb 2001 00:48:47 -0800 (PST) Received: (qmail 27006 invoked by uid 666); 3 Feb 2001 08:55:48 -0000 Received: from reggae-08-177.nv.iinet.net.au (HELO elischer.org) (203.59.3.177) by mail.m.iinet.net.au with SMTP; 3 Feb 2001 08:55:48 -0000 Message-ID: <3A7BC5C4.75247E49@elischer.org> Date: Sat, 03 Feb 2001 00:48:04 -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: "Rogier R. Mulhuijzen" Cc: freebsd-current@freebsd.org, freebsd-net@freebsd.org Subject: Re: Patch for non-netgraph bridge code worthy of attention forpeople experimenting with bridging setups (including ng_bridge) References: <4.3.2.7.0.20010202205233.00d51c30@mail.drwilco.net> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Rogier R. Mulhuijzen" wrote: > > I found this while experimenting with both "legacy" bridge and ng_bridge. > The bridging code doesn't check its activation everywhere so when I started > using an ng_bridge node I started getting weird errors. > > Patch is rather simple, can someone submit this? I'm a litle confused when I look at this patch. I think this is the wrong fix. I see that you are accounting for packets coming in on two interfaces, but the aim of the netgraph bridging is to make it look as if the packets are all coming in off one interface. Theoretically the bridging code should be attached to only one 'upper' part of a driver and all packets should arrive at higher levels, looking as if they have all come in through that one interface. The other interfaces in the bridge will never receive anything because their input has been diverted. To the system it should look as if the entire bridged network is on that one interface. If this is not the case then we need to fix the bridging code so that it is true, rather than clutter up higher level code trying to account for a bug in the lower code. So how can an incoming packet look like it is not coming from that single interface? 1/ ifnet pointer. The function ng_ether_rcv_upper() adjust this, so that's not the problem. 2/ rcv interface MAC address. This is stripped off before arp gets it (also in ng_ether_rcv_upper()). 3/ the tha[] or sha[] fields may contain a MAC address for some other interface. (depending on how the remote mechine fills out those fields), but our outgoing packets should have the MAC address of the interface we have selected as out main interface, independent of which interface it actually goes out of, (unless the hardware over-writes it). so even that should point to the single interface. The other interfaces should (maybe) beb ifconfigged 'UP' but they should not have IP addresses assigned tp them, as they are being slaved from the main interface by the ng_bridging code so everything comes and goes via that one. so I'm slightly confused as to what problem this solves. (I'm not saying there isn't one, just that I con't figure out what it is). Everything should act as if there is just one interface when netgraph bridging is turned on. > > DocWilco > > >Date: Mon, 29 Jan 2001 08:20:01 -0800 (PST) > >To: drwilco@drwilco.net > >From: gnats-admin@FreeBSD.org > >Subject: Re: kern/24720: Bridging code does not always check activation > >(w/patch) > >Reply-To: gnats-admin@FreeBSD.org, freebsd-bugs@FreeBSD.org > >Sender: gnats@FreeBSD.org > > > >Thank you very much for your problem report. > >It has the internal identification `kern/24720'. > >The individual assigned to look at your > >report is: freebsd-bugs. > > > >You can access the state of your problem report at any time > >via this link: > > > >http://www.freebsd.org/cgi/query-pr.cgi?pr=24720 > > > > >Category: kern > > >Responsible: freebsd-bugs > > >Synopsis: Bridging code does not always check activation (w/patch) > > >Arrival-Date: Mon Jan 29 08:20:01 PST 2001 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000-2001 ---> X_.---._/ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message