Bug 83270 - systemd-networkd: Multiple addresses are added in the reverse order
Summary: systemd-networkd: Multiple addresses are added in the reverse order
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Tom Gundersen
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-30 12:27 UTC by Jonas Hahnfeld
Modified: 2015-01-12 04:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jonas Hahnfeld 2014-08-30 12:27:33 UTC
Example: eth0.network

[Match]
Name=eth0

[Network]
Address=192.168.122.133/24
Address=192.168.122.233/24
Gateway=192.168.122.1
EOF

$ ip addr
[...]
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:cc:2e:59 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.233/24 brd 192.168.122.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.122.133/24 brd 192.168.122.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fecc:2e59/64 scope link 
       valid_lft forever preferred_lft forever

Looking at the code I see that static addresses are prepended to the list (networkd-address.c, line 62) and then looped over in networkd-link.c, line 551.

Is it a feature or a bug? It's pretty annoying for setting the default and the alias IP...
Comment 1 Zbigniew Jedrzejewski-Szmek 2015-01-12 04:59:14 UTC
Should be fixed by http://cgit.freedesktop.org/systemd/systemd/commit/?id=1e39ff926f.


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.