summaryrefslogtreecommitdiff
path: root/src/network/networkd-dhcp6.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-09-28 17:16:12 +0200
committerTom Gundersen <teg@jklm.no>2015-10-21 02:35:31 +0200
commit36c32f6120a0c3fe19be5aeaa1926e179e8c29ba (patch)
treec10e5f502a2757fa9e1bf1499063ec272a5c7039 /src/network/networkd-dhcp6.c
parent8012cd391932d58b44332df106d426a360faf0a6 (diff)
networkd: address - factor out address_update()
Call back into link_check_ready() whenever an address state change may have made a link ready.
Diffstat (limited to 'src/network/networkd-dhcp6.c')
-rw-r--r--src/network/networkd-dhcp6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 8115232e1d..95cdb80b0a 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -63,7 +63,7 @@ static int dhcp6_address_handler(sd_netlink *rtnl, sd_netlink_message *m,
return 1;
}
-static int dhcp6_address_update(Link *link, struct in6_addr *ip6_addr,
+static int dhcp6_address_change(Link *link, struct in6_addr *ip6_addr,
uint8_t prefixlen, uint32_t lifetime_preferred,
uint32_t lifetime_valid) {
int r;
@@ -87,7 +87,7 @@ static int dhcp6_address_update(Link *link, struct in6_addr *ip6_addr,
SD_ICMP6_ND_ADDRESS_FORMAT_VAL(addr->in_addr.in6),
addr->prefixlen, lifetime_preferred, lifetime_valid);
- r = address_update(addr, link, dhcp6_address_handler);
+ r = address_change(addr, link, dhcp6_address_handler);
if (r < 0)
log_link_warning_errno(link, r, "Could not assign DHCPv6 address: %m");
@@ -121,7 +121,7 @@ static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link) {
if (r == -EADDRNOTAVAIL)
prefixlen = 128;
- r = dhcp6_address_update(link, &ip6_addr, prefixlen,
+ r = dhcp6_address_change(link, &ip6_addr, prefixlen,
lifetime_preferred, lifetime_valid);
if (r < 0)
return r;
@@ -300,7 +300,7 @@ static int dhcp6_prefix_expired(Link *link) {
log_link_info(link, "IPv6 prefix length updated "SD_ICMP6_ND_ADDRESS_FORMAT_STR"/%d", SD_ICMP6_ND_ADDRESS_FORMAT_VAL(ip6_addr), 128);
- dhcp6_address_update(link, &ip6_addr, 128, lifetime_preferred, lifetime_valid);
+ dhcp6_address_change(link, &ip6_addr, 128, lifetime_preferred, lifetime_valid);
}
return 0;