summaryrefslogtreecommitdiff
path: root/src/network/networkd-dhcp6.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-18 17:06:31 +0200
committerTom Gundersen <teg@jklm.no>2015-10-22 17:19:54 +0200
commit9b4d33193af554628c369681404b0c3809a7d6db (patch)
tree1f340c13ee4317dedb3acb91021ee3b60e1b92ea /src/network/networkd-dhcp6.c
parent6d8f6b0b2ae14aee0b02c7e3d1edaeaa2c118056 (diff)
networkd: dhcp6 - do not handle prefix expiration
This ressurects 47d45d3cde45d6545367570264e4e3636bc9e345. We now always use /128 prefixes, so there is no need for the DHCPv6 code to know about prefixes expiring.
Diffstat (limited to 'src/network/networkd-dhcp6.c')
-rw-r--r--src/network/networkd-dhcp6.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index f47ac15dcd..57c81cb646 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -25,7 +25,6 @@
#include "networkd-link.h"
#include "network-internal.h"
-#include "sd-ndisc.h"
#include "sd-dhcp6-client.h"
static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link);
@@ -247,42 +246,3 @@ int dhcp6_configure(Link *link, bool inf_req) {
link->dhcp6_client = sd_dhcp6_client_unref(link->dhcp6_client);
return r;
}
-
-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_ndisc_get_expired_prefix(link->ndisc_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;
-
- log_link_info(link, "IPv6 prefix "SD_NDISC_ADDRESS_FORMAT_STR"/%d expired",
- SD_NDISC_ADDRESS_FORMAT_VAL(*expired_prefix),
- expired_prefixlen);
-
- sd_dhcp6_lease_reset_address_iter(lease);
-
- while (sd_dhcp6_lease_get_address(lease, &ip6_addr,
- &lifetime_preferred,
- &lifetime_valid) >= 0) {
-
- r = sd_ndisc_prefix_match(expired_prefix, expired_prefixlen,
- &ip6_addr);
- if (r < 0)
- continue;
-
- log_link_info(link, "IPv6 prefix length updated "SD_NDISC_ADDRESS_FORMAT_STR"/%d", SD_NDISC_ADDRESS_FORMAT_VAL(ip6_addr), 128);
-
- dhcp6_address_change(link, &ip6_addr, lifetime_preferred, lifetime_valid);
- }
-
- return 0;
-}