[Bug 252596] ping to 255.255.255.255 does not set broadcast MAC
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 16 Jul 2022 16:03:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252596 --- Comment #8 from Mike Karels <karels@freebsd.org> --- I have mixed feelings about restoring the checks for INADDR_BROADCAST and INADDR_ANY. The problem with a send to 255.255.255.255 for a broadcast is that it doesn't allow any way to select the outgoing interface. The in(4) man page is out of date on this; the interface selection is now done via routing. This means that a send to 255.255.255.255 would often follow the default route, which may or may not be right. A more explicit route can be added, although that seems like a poor way to control an application, and only allows one interface to be used. The application already needs to set the SO_BROADCAST option; setting IP_ONESBCAST and providing a way to specify the destination address doesn't seem like a big increment. Granted, ping will not have a way to do this, but that doesn't seem like a very important use case. If the change you cited was made recently, I might be more worried about compatibility. But it was made almost 6 years ago. -- You are receiving this mail because: You are the assignee for the bug.