tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/48104: Incorrect forwarding of broadcast packets by bridge(4)
(2014/02/21 9:25), Lloyd Parkes wrote:
> Hi all,
> I finally got around to running the last test on my changes to bridge(4) and
> it all works well.
>
> The only real problem I had to think about was that the point in the network
> stack for tapping off bridged packets was above the point in the network
> stack where packets are injected. This means that when multicasting packets
> up the network stack you have to do something to prevent a packet storm. My
> initial implementation used a link local mbuf flag, but bridging is
> inherently not link local, so I discarded that method.
>
> I settled on moving the point at which the bridge taps into the network stack
> down the stack so that it is now below the point at which packets are
> injected into the stack. In particular, I removed the bridge code from
> ether_input() and made the bridge update the struct ifnet if_input field when
> an interface is added to or removed from a bridge. The code for updating the
> if_input field is purposefully simple and conservative.
>
I prefer this reconstruction of ether_input and bridge_input.
Actually I (and my coworker) are thinking the approach to make
the part simple.
I'm checking and testing your patch.
> There are some interface drivers that call ether_input() directly instead of
> indirecting through struct ifnet if_input and that seems to be a requirement
> that was missed when porting the drivers from FreeBSD. I’ll PR those drivers
> once I finish this email and send this patch to kern/48104.
>
> Overall this patch removes 107 of old code and adds 85 lines of new code. I
> know it’s a crude code metric, but I do like increased functionality with
> less code.
me too :)
Regards,
ozaki-r
>
> Cheers,
> Lloyd
Home |
Main Index |
Thread Index |
Old Index