GNOME Bugzilla – Bug 728595
link-local addresses should configure a link scope instead of global scope
Last modified: 2014-04-28 08:45:42 UTC
When NetworkManager is configured to assign a link-local IPv4 address to an interface, it ends up with a global scope. This happens in two cases: - Configure method=link-local - Configure method=manual, addresses1=169.254.x.x;16:0.0.0.0 $ ip link show dev <iface> # for both methods inet 169.254.x.y/16 brd 169.254.255.255 scope global <iface> valid_lft forever preferred_lft forever Expected output: inet 169.254.x.y/16 brd 169.254.255.255 scope link <iface> valid_lft forever preferred_lft forever This behavior causes conflicts with two network interfaces having the same _link-local_ address.
Additional details about distro/version: Arch Linux - networkmanager 0.9.8.8-1 (method=link-local) Kubuntu 14.04 - network-manager 0.9.8.8-0ubuntu7 (method=manual)
Created attachment 274809 [details] [review] Set link scope for IP4LL addresses (based on 0.9.8.9) This is a patch for the 0.9.8.9 series. It was tested on top of Ubuntu's 0.9.8.8-0ubuntu7.
Created attachment 274811 [details] [review] Set link scope for IP4LL addresses (based on 0.9.9.1.x) Note: untested. After applying the previous patch, the scope changes from "scope global" to "scope link". Unfortunately, it did not fix the actual issue I was having. I can still not assign the same address to two interfaces, it simply does not generate ARP responses for one of the interfaces. (different issue) Pinging on the same host does not work either. That is, given: - eth1: 169.254.a.b - eth2: 169.254.c.d These do not trigger ARP responses: - ping 169.254.c.d -I eth2 - ping 169.254.a.b -I eth1
Review of attachment 274811 [details] [review]: Looks good to me.
Review of attachment 274809 [details] [review]: Looks good to me.
Lets get another review of both of these too though.
Both patches look to me good as well. The one from master branch, could drop the braces around the if, but never mind...
Thanks Thomas, feel free to merge these if you've got a bit of time.
Both patches applied. Note that I reworded the commit messages and modified the patches (on master: coding style, remove the braces around if; on nm-0.9.8: add missing #include). http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=a2eb4789ac2fe8a6389aabb83285bc667b86d941 http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=3a409a8ccc7ff90ca411014a33f0ce4d59ba040c
The 0.9.8.x patch compiled fine for me without that header (Ubuntu 14.04). Thanks for merging.
(In reply to comment #10) > The 0.9.8.x patch compiled fine for me without that header (Ubuntu 14.04). Interesting... It didn't compile for me, Fedora 20... anyway :)