From: Steven Barth Date: Wed, 13 Aug 2014 14:53:06 +0000 (+0200) Subject: PD: don't consider deprecated assigned prefixes when calculating avilable PD size X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f41da55f11f06361e23f11a87f179aa56565c106;p=project%2Fodhcpd.git PD: don't consider deprecated assigned prefixes when calculating avilable PD size --- diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index 90dcaf5..2fef626 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -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;