summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2015-03-25 13:22:43 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2015-03-27 13:57:24 +0200
commit47d45d3cde45d6545367570264e4e3636bc9e345 (patch)
tree73d1d8dd6dd88de4a7f94e4c43fcf7c6d80511c3
parent851c9f82736c89d423b244a292e153ec7124d309 (diff)
networkd-dhcp6: Do not handle prefix expiry
Expiring prefixes need not be handled anymore as the kernel has been instructed not to create routes for DHCPv6 assigned addresses via the IFA_F_NOPREFIXROUTE flag.
-rw-r--r--src/network/networkd-dhcp6.c42
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",