]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: Remove 0 sla and 0 prefix means whole prefix.
authorRoy Marples <roy@marples.name>
Thu, 10 Oct 2019 10:20:09 +0000 (11:20 +0100)
committerRoy Marples <roy@marples.name>
Thu, 10 Oct 2019 10:20:09 +0000 (11:20 +0100)
If we get a /48 we can still use /64 with a sla of 0.
It's all valid, my bad.

src/dhcp6.c

index 1d409e768e59f5868cfa0f105d5cfad561ac470e..4ef2e565e96935c3acee5653efd43b8a783f221e 100644 (file)
@@ -532,13 +532,6 @@ dhcp6_delegateaddr(struct in6_addr *addr, struct interface *ifp,
                asla.prefix_len = 0;
                asla.sla_set = 0;
                sla = &asla;
-       } else if (sla->sla == 0 && sla->prefix_len == 0) {
-               /* An SLA of 0 was set with no prefix length specified.
-                * This means we delegate the whole prefix. */
-               asla.sla = sla->sla;
-               asla.prefix_len = prefix->prefix_len;
-               asla.sla_set = 0;
-               sla = &asla;
        } else if (sla->prefix_len == 0) {
                /* An SLA was given, but prefix length was not.
                 * We need to work out a suitable prefix length for