Different behavior of ping'ing INADDR_BROADCAST?

Eygene Ryabinkin rea-fbsd at codelabs.ru
Mon Jan 8 02:36:45 PST 2007

Tadaaki, good day!

> 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.)

Exactly, thank you very much for the pointer!

> 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.

If ip_output.c will receive patching, it probably will be unneccessary to
patch `ping' ;)) The problem with ip_output.c patch is that it is rather
hard to spot the right interface to output the broadcast to: no pointers
are given when the packet just destined to Probably
the best way will be to

- output it to all interfaces with broadcast capability,
- limit the TTL to 1.

The patch for `ping' introduces '-b' flag namely for the purpose of
identifying the interface the broadcast will go to.

More information about the freebsd-net mailing list