Bug 90103

Summary: networkd: fails to bring interface up if ipv6 is disabled
Product: systemd Reporter: Mauro Santos <registo.mailling>
Component: generalAssignee: Tom Gundersen <teg>
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: 1i5t5.duncan, bugs.freedesktop.org
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Mauro Santos 2015-04-19 18:57:04 UTC
As the summary says, systemd-networkd fails to bring the interface up if ipv6 is disabled with the ipv6.disable=1 kernel parameter. This is a regression on systemd 219 as with 218 it was working.

The ip address configured in the respective .network file is assigned to the interface, in my case a bridge create with a .netdev file, but the interface will be down.

> ip a s brkvm
4: brkvm: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
    link/ether 36:98:33:12:74:df brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.1/24 brd 192.168.56.255 scope global brkvm
       valid_lft forever preferred_lft forever

In this case the output on the journal is as follows:

> journalctl -b -u systemd-networkd -o cat
Starting Network Service...
brkvm           : netdev ready
Enumeration completed
Started Network Service.
brkvm           : Cannot configure IPv6 forwarding for interface: No such file or directory
brkvm           : brkvm           : could not bring up interface: Address family not supported by protocol
brkvm           : link configured
wlan0           : gained carrier

If ipv6 is not disabled then the ipv4 address I'm trying to set will be assigned to the interface and the interface will be brought up.
Comment 1 freedesk.apriori 2015-04-20 20:54:31 UTC
Also seeing this. As a workaround, the interface seems to be configured correctly if I manually do «ip link set … up» and restart networkd afterwards.
Comment 2 Duncan 2015-05-02 07:08:28 UTC
This blocking my 219 upgrade.

FWIW:

$$ zgrep IPV6 /proc/config.gz 
# CONFIG_IPV6 is not set

As I'm on gentoo I have multiple systemd versions available, and I've had 219 masked waiting on this.  An update brought a new bump tonite, but it still has the bug, so I masked it too, decided I better file a bug, and found this.
Comment 3 Duncan 2015-05-23 12:22:43 UTC
(In reply to freedesk.apriori from comment #1)
> As a workaround, the interface seems to be configured
> correctly if I manually do «ip link set … up» and restart networkd
> afterwards.

Thanks for the hint.  I'm still using ifconfig here, but ifconfig [iface] up is a nice an easy work around. =:^)  With a patch for an unrelated 219 bug I reported already applied successfully locally, this workaround removes the blockage on 219 upgrade and I can leave 218 behind.

The distro (gentoo) doesn't yet have 220 available.  When it does, I'll try it too and update with results here if nobody else has.
Comment 4 Duncan 2015-05-24 13:23:35 UTC
Progress!

I bisected the issue down to:

7f77697
networkd: add support for IPv6 tokens


Unfortunately that's not a simple revert as newer commits build on it, preventing a simple revert.  And not being a dev, the patch/commit is too complex for me to easily figure out what to do from there.

But knowing the specific culprit commit should make it easier to figure out what's going wrong; why networkd is configuring the IPv4-only interface but not bringing it up, based only on those changes. =:^)
Comment 5 Tom Gundersen 2015-05-25 15:42:37 UTC
Thanks for the report!

This should now be fixed in git HEAD. If not, please reopen.
Comment 6 Duncan 2015-05-26 14:42:12 UTC
(In reply to Tom Gundersen from comment #5)
> This should now be fixed in git HEAD. If not, please reopen.

Confirmed.  Commit 01d28f81 fixes it.  I applied just that on top of the other patches gentoo is already applying to 220, and 220 with it appears to work just fine for me now, while 219 and 220 without it didn't.

Thanks. =:^)

Duncan

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.