Different behavior of ping'ing INADDR_BROADCAST?
Bruce M. Simpson
bms at FreeBSD.org
Wed Jan 10 11:42:44 PST 2007
Eygene Ryabinkin wrote:
>
> For me the routing gives the default gateway as the next hop, so the 'dst'
> will be rewritten at the line 241.
>
You're quite right, I stand corrected -- the undirected broadcast case
is hitting the default route.
> I think that this confirms my findings. Have you tried to look at your packet
> with tcpdump? Link-level MAC should be set to your routers one, not to yhe
> 0xffffffff.
>
I saw this as well. The behaviour is actually as expected. FreeBSD has
done this for years. Some years ago I did some work on a fix for this,
but it was not net-smp safe.
Wes Peters suggested treating INADDR_BROADCAST traffic like
multicast-routed traffic. Whilst the MROUTING code has queues for each
entry in the Multicast Forwarding Cache (MFC) and knows how to dispatch
the same mbuf chain more than once, it isn't compiled in by default.
Regards
BMS
More information about the freebsd-net
mailing list