]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If the SLA is zero and the required prefix length is zero, just use the
authorRoy Marples <roy@marples.name>
Sat, 7 Mar 2015 16:31:22 +0000 (16:31 +0000)
committerRoy Marples <roy@marples.name>
Sat, 7 Mar 2015 16:31:22 +0000 (16:31 +0000)
delegated prefix length.

dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 073294fee89f621e252fe41584d714024e927fff..16cf3d902b68991f32570c7769f38788bf24bbff 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -419,7 +419,10 @@ dhcp6_delegateaddr(struct in6_addr *addr, struct interface *ifp,
                }
        } else if (sla->prefix_len == 0) {
                asla.sla = sla->sla;
-               asla.prefix_len = 0;
+               if (asla.sla == 0)
+                       asla.prefix_len = prefix->prefix_len;
+               else
+                       asla.prefix_len = 0;
                sla = &asla;
        }
        if (sla->prefix_len == 0) {