PD: don't consider deprecated assigned prefixes when calculating avilable PD size
authorSteven Barth <steven@midlink.org>
Wed, 13 Aug 2014 14:53:06 +0000 (16:53 +0200)
committerSteven Barth <steven@midlink.org>
Wed, 13 Aug 2014 14:53:06 +0000 (16:53 +0200)
src/dhcpv6-ia.c

index 90dcaf53f46ff66a83fdda5d97041bf9a656020c..2fef6267225b39005419a2b990f80035e7d63be9 100644 (file)
@@ -595,7 +595,7 @@ static void update(struct interface *iface)
        int minprefix = -1;
 
        for (int i = 0; i < len; ++i) {
-               if (addr[i].prefix > minprefix)
+               if (addr[i].preferred > 0 && addr[i].prefix > minprefix)
                        minprefix = addr[i].prefix;
 
                addr[i].addr.s6_addr32[3] = 0;