summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-03-30 10:53:11 +0200
committerSteven Barth <steven@midlink.org>2015-03-30 10:53:11 +0200
commit3b4e6d19b7ce0953efcd6d1c545b031b73e0ab6e (patch)
tree257a17e4fb9f25784fcb0fb6c04c520dc62e713c
parentbc14cf3779925eadefbced51b70bc6f90b90a79e (diff)
dhcpv6: fix default assignment of non-64
Signed-off-by: Steven Barth <steven@midlink.org>
-rw-r--r--src/dhcpv6-ia.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index f850b02..7db4cee 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -264,7 +264,8 @@ void dhcpv6_write_statefile(void)
for (size_t i = 0; i < addrlen; ++i) {
if (addrs[i].prefix > 96 || c->valid_until <= now ||
- (iface->managed < RELAYD_MANAGED_NO_AFLAG && i != m))
+ (iface->managed < RELAYD_MANAGED_NO_AFLAG && i != m &&
+ addrs[i].prefix == 64))
continue;
addr = addrs[i].addr;
@@ -764,7 +765,8 @@ static size_t append_reply(uint8_t *buf, size_t buflen, uint16_t status,
n.addr.s6_addr32[3] = htonl(a->assigned);
size_t entrlen = sizeof(n) - 4;
- if (iface->managed < RELAYD_MANAGED_NO_AFLAG && i != m)
+ if (iface->managed < RELAYD_MANAGED_NO_AFLAG && i != m &&
+ addrs[i].prefix == 64)
continue;
if (datalen + entrlen + 4 > buflen || a->assigned == 0)