summaryrefslogtreecommitdiff
path: root/src/network/networkd-manager.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-09-30 14:01:44 +0200
committerTom Gundersen <teg@jklm.no>2015-10-21 02:35:31 +0200
commitadda1ed94a04742ddacdc76dfa311816e1ed9f68 (patch)
treec29e5b9867a54e80baf83505f9c353f96e453017 /src/network/networkd-manager.c
parentfcf50cff129c1b0c6c415428e659da40c3053e6e (diff)
networkd: address - distinguish between addresses added by us and by others
We only keep the addresses that we added ourselves in link->addresses, and introduce a new set link->addresses_foreign to keep addresses of unknown origin. Only functional change is that "foreign" addresses no longer prevent a link from entering "configured" state.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r--src/network/networkd-manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 9a7e71fce8..2b83ee81ed 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -400,7 +400,8 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
if (address)
log_link_debug(link, "Updating address: %s/%u (valid for %s)", buf, prefixlen, valid_str);
else {
- r = address_add(link, family, &in_addr, prefixlen, &address);
+ /* An address appeared that we did not request */
+ r = address_add_foreign(link, family, &in_addr, prefixlen, &address);
if (r < 0) {
log_link_warning_errno(link, r, "Failed to add address %s/%u: %m", buf, prefixlen);
return 0;