summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-11 22:44:51 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-11 22:46:42 +0200
commit44e7b9492617408130d11ffa451c2660942974f6 (patch)
tree3f92bbd49b5c08ba427eb0add72322d0b4f9fe80 /src/network/networkd-link.c
parentcedc8c44d43c8b6689ae5f5ebe1aabb7ad9755ba (diff)
networkd: monopolize in_addr utility functions in shared/in-addr-util.h
Primarily, this means we get rid of net_parse_inaddr(), and replace it everywhere with in_addr_from_string() and in_addr_from_string_auto(). These functions do not clobber the callers arguments on failure, which is more close to our usual coding style.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index accb42bf37..d13a47bb2e 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -750,7 +750,7 @@ static int link_enter_set_addresses(Link *link) {
return r;
}
- prefixlen = net_netmask_to_prefixlen(&netmask);
+ prefixlen = in_addr_netmask_to_prefixlen(&netmask);
r = address_new_dynamic(&address);
if (r < 0) {
@@ -983,7 +983,7 @@ static int dhcp_lease_lost(Link *link) {
sd_dhcp_lease_get_address(link->dhcp_lease, &addr);
sd_dhcp_lease_get_netmask(link->dhcp_lease, &netmask);
- prefixlen = net_netmask_to_prefixlen(&netmask);
+ prefixlen = in_addr_netmask_to_prefixlen(&netmask);
address->family = AF_INET;
address->in_addr.in = addr;
@@ -1073,7 +1073,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
return r;
}
- prefixlen = net_netmask_to_prefixlen(&netmask);
+ prefixlen = in_addr_netmask_to_prefixlen(&netmask);
r = sd_dhcp_lease_get_router(lease, &gateway);
if (r < 0 && r != -ENOENT) {