After upgrading to OpenRC 0.9.4 the broadcast address does not get set on net.eth0 and defaults to 0.0.0.0. I have a number of VMs which are essentially identical and those which do not have iproute2 installed (i.e. use ifconfig) do not have a problem.
$ equery l openrc
* Searching for openrc ...
[IP-] [ ] sys-apps/openrc-0.9.4:0
$ equery l iproute2
* Searching for iproute2 ...
[IP-] [ ] sys-apps/iproute2-2.6.35-r2:0
$ grep eth0 /etc/conf.d/net
routes_eth0="default via 192.168.2.254"
If I compare the output of a working/non-working machine when running the init
script with --debug I see the following interesting difference:
-+ ip addr add 192.168.2.100/24 dev eth0
++ ifconfig eth0 192.168.2.155 netmask 255.255.255.0
I believe in the case with iproute2 then it should execute this line when a broadcast address is not specified in the net conf.d
ip addr add 192.168.2.100/24 broadcast + dev eth0
Apparently the behaviour of ifconfig automatically calculates the broadcast address when it is not specified.
I believe the fix is to intialise the broadcast variable as "broadcast +" in the _add_address() function of /lib/rc/net/iproute2.sh or to set it to "broadcast +" if it is empty after the options are parsed.
Steps to Reproduce:
1. Reboot virtual machine, examine interface configuration
broadcast address is 0.0.0.0
broadcast address is 192.168.2.255
This is fixed in commit a1c6559.
Thanks for the report.