dhcpv6: fix typo
authorSteven Barth <steven@midlink.org>
Thu, 21 May 2015 14:21:59 +0000 (16:21 +0200)
committerSteven Barth <steven@midlink.org>
Thu, 21 May 2015 15:05:32 +0000 (17:05 +0200)
src/dhcpv6-ia.c

index a6ea66f1109ba1cd1a7ba116db8b6c67da33f3f8..0bcb4530d10d41dcd112d1f502f2ff3c693bf4a8 100644 (file)
@@ -758,7 +758,7 @@ static size_t append_reply(uint8_t *buf, size_t buflen, uint16_t status,
 
                                        if (datalen + entrlen + 4 > buflen ||
                                                        (a->assigned == 0 && a->managed_size == 0) ||
-                                                       (!a->managed_size && a->length < p.preferred))
+                                                       (!a->managed_size && a->length <= addrs[i].prefix))
                                                continue;
 
                                        memcpy(buf + datalen, &p, sizeof(p));