"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: [EMAIL PROTECTED]
> >From: [EMAIL PROTECTED]
> >Subject: Re: kern/24720: Bridging code does not always check activation
> >(w/patch)
> >Reply-To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> >Sender: [EMAIL PROTECTED]
> >
> >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 [EMAIL PROTECTED]
> with "unsubscribe freebsd-net" in the body of the message
--
__--_|\ Julian Elischer
/ \ [EMAIL PROTECTED]
( OZ ) World tour 2000-2001
---> X_.---._/
v
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message