diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-dhcp6.c | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index 283a7d6992..e863f4b347 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -86,42 +86,6 @@ static int dhcp6_address_update(Link *link, struct in6_addr *ip6_addr, return r; } -static int dhcp6_prefix_expired(Link *link) { - int r; - sd_dhcp6_lease *lease; - struct in6_addr *expired_prefix, ip6_addr; - uint8_t expired_prefixlen; - uint32_t lifetime_preferred, lifetime_valid; - - r = sd_icmp6_ra_get_expired_prefix(link->icmp6_router_discovery, - &expired_prefix, &expired_prefixlen); - if (r < 0) - return r; - - r = sd_dhcp6_client_get_lease(link->dhcp6_client, &lease); - if (r < 0) - return r; - - sd_dhcp6_lease_reset_address_iter(lease); - - while (sd_dhcp6_lease_get_address(lease, &ip6_addr, - &lifetime_preferred, - &lifetime_valid) >= 0) { - - r = sd_icmp6_prefix_match(expired_prefix, expired_prefixlen, - &ip6_addr); - if (r >= 0) { - r = dhcp6_address_update(link, &ip6_addr, 128, - lifetime_preferred, - lifetime_valid); - - return r; - } - } - - return 0; -} - static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link) { int r; sd_dhcp6_lease *lease; @@ -310,6 +274,7 @@ static void icmp6_router_handler(sd_icmp6_nd *nd, int event, void *userdata) { switch(event) { case ICMP6_EVENT_ROUTER_ADVERTISMENT_NONE: + case ICMP6_EVENT_ROUTER_ADVERTISMENT_PREFIX_EXPIRED: return; case ICMP6_EVENT_ROUTER_ADVERTISMENT_TIMEOUT: @@ -319,11 +284,6 @@ static void icmp6_router_handler(sd_icmp6_nd *nd, int event, void *userdata) { break; - case ICMP6_EVENT_ROUTER_ADVERTISMENT_PREFIX_EXPIRED: - dhcp6_prefix_expired(link); - - break; - default: if (event < 0) log_link_warning(link, "ICMPv6 error: %s", |