Different behavior of ping'ing INADDR_BROADCAST?

Tadaaki Nagao nagao at iij.ad.jp
Mon Jan 8 01:32:44 PST 2007


Hi,

> > When FBSD is pinging 0xffffffff it does not use the Ethernet broadcasts,
> > when the link-level destination MAC is set to 0xffffffffffff, using some
> > 'known MAC' instead. For the network broadcast address -- it does use
> > link-level broadcasts.

This seems to be the same problem as kern/99558: "FreeBSD 6.1 can't send
packets to INADDR_BROADCAST".

Maybe andre has some thoughts on how to fix this issue? (I'm CC'ing him.)

> > For me the 'known MAC' is that of our border router that serves as
> > the default destination. And my box doing the ARP request for the
> > precisely the IP of the router before pinging 255.255.255.255. You can
> > try to empty your ARP table and then ping 255.255.255.255 watching
> > for the ARP requests and the link-level header of the ICMP packets.
> 
> OK, I've found that in order to ping undirected broadcast address
> one should add some functionality to the 'ping' utility.

It seems to me from the PR above, that before patching `ping', ip_output.c
should receive some sort of fix in handling INADDR_BROADCAST.

-- 
Tadaaki Nagao <nagao at iij.ad.jp>
Applied Research and Development Department, Internet Initiative Japan Inc.


More information about the freebsd-net mailing list