Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392593 - sys-apps/openrc-0.9.4 does not set network interface broadcast address when using iproute2
Summary: sys-apps/openrc-0.9.4 does not set network interface broadcast address when u...
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
Whiteboard: openrc:oldnet
Depends on:
Blocks: openrc-tracker
  Show dependency tree
Reported: 2011-11-30 12:08 UTC by Spooky Ghost
Modified: 2013-04-25 23:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Spooky Ghost 2011-11-30 12:08:47 UTC
After upgrading to OpenRC 0.9.4 the broadcast address does not get set on net.eth0 and defaults to  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"

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 dev eth0
++ ifconfig eth0 netmask

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 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/ or to set it to "broadcast +" if it is empty after the options are parsed.

Reproducible: Always

Steps to Reproduce:
1. Reboot virtual machine, examine interface configuration
Actual Results:  
broadcast address is

Expected Results:  
broadcast address is
Comment 1 William Hubbs gentoo-dev 2011-12-10 03:01:03 UTC
This is fixed in commit a1c6559.
Thanks for the report.