On 20/08/16 19:09, Adrian Chadd wrote:
On 20 August 2016 at 11:02, Ryan Stone <ryst...@gmail.com> wrote:
On Sat, Aug 20, 2016 at 1:30 PM, Slawa Olhovchenkov <s...@zxy.spb.ru> wrote:
For host enought have [hidden] alias with broadcsts bits.
Anyway, don't should relay on the L2 information, you can recive L3
unicast addressed packets (with alien dst IP address) in L2 broadcas
packet.

This is still handled correctly.  The new code only checks for L3 broadcast
addresses on L2 broadcast packets, but we still check the L3 address before
treating it as a broadcast. The problem is that I assumed that all paths
into the IP stack would set M_BCAST, but as Bruce has pointed out there are
cases like PPP which do not.

So why not fix those paths?

Because it would involve doing something similar to what if_ethersubr.c does right now: a direct comparison with FF:FF:FF:FF:FF:FF. Doing so outside of Ethernet would be invasive and one of those 'bad' layer crossings.

This is tricky to get right. NetBSD introduced the M_PROMISC flag to cover situations which can occur when Ethernet can be re-entered by layers 'above' its original invocation. (I merged it here.)

Ryan proposes slipping the definition of M_BCAST to include the network layer, inside ip_input() itself. That would not strictly violate layering, but bends the original meaning of the flag somewhat.

That may work, provided it doesn't tread on the toes of anything above it. However the situation is somewhat similar to that of M_PROMISC.

_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to