summaryrefslogtreecommitdiff
path: root/src/network/networkd-address.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-11-24 23:36:58 +0100
committerTom Gundersen <teg@jklm.no>2013-11-26 01:32:25 +0100
commitc166a070553511e402de5ad216d3fb62b49bdacb (patch)
tree9aedfe31b512a6f72b4ac27124d7c8e21ed6219e /src/network/networkd-address.c
parent46fabae6b33386277f5ee394cf0d5382376586da (diff)
networkd: minor fixes
In particular, store the ifname, though we should only use it carefully, as it is not guaranteed to be stable. Using it for logging is fine though.
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r--src/network/networkd-address.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 9cfc0955d3..0555d317a4 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -79,7 +79,12 @@ int address_configure(Address *address, Link *link,
_cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
int r;
+ assert(address);
+ assert(address->family == AF_INET || address->family == AF_INET6);
+ assert(link);
+ assert(link->ifindex > 0);
assert(link->manager);
+ assert(link->manager->rtnl);
r = sd_rtnl_message_addr_new(RTM_NEWADDR, link->ifindex,
address->family, address->prefixlen,
@@ -125,8 +130,6 @@ int address_configure(Address *address, Link *link,
return r;
}
- link->rtnl_messages ++;
-
return 0;
}