udhcpc default.script (busybox-initscripts) fails to set broadcast address
The default.script file included in the busybox-initscripts package does not use the ‘broadcast’ variable, and therefore when setting the IP address the machines have broadcast IP set to 0.0.0.0.
My shell-fu is not very good, or I would submit a patch; needless to say, if the broadcast variable is set, it should be used as such:
88: ip addr add $ip/$mask broadcast $broadcast dev $interface
97: ip addr add $ip/$mask broadcast $broadcast dev $interface
I have just added this to my own custom package because I know that broadcast will always be provided by our DHCP server. But it is not always, so it should probably be determined if it is set before blindly using it as I have above. This is just the syntax to use if it is set.
Thank you for your consideration.
(from redmine: issue id 2880, created on 2014-05-05, closed on 2014-05-06)
- Changesets:
- Revision 692420e9 by Natanael Copa on 2014-05-06T10:35:20Z:
main/busybox-initscripts: add support for broadcast from dhcp
ref #2880
- Revision ba260652 by Natanael Copa on 2014-05-06T10:57:15Z:
main/busybox-initscripts: add support for broadcast from dhcp
fixes #2880
(cherry picked from commit 692420e9abb5049050b09d1385ad98befba1ecfc)