summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-05-04 10:19:02 +0100
committerRoy Marples <roy@marples.name>2019-05-04 10:19:02 +0100
commit896ef4a54b0578985e5e1360b141593f1d62837b (patch)
tree0d6e36d52d12b456c8d9a4b7f809da5cff93a42f
parentbeaaf416dc32e1bbac80b8769be219792ba96eec (diff)
downloaddhcpcd-896ef4a54b0578985e5e1360b141593f1d62837b.tar.xz
DHCPv6: Fix exclude prefix length check.dhcpcd-7.2.2
-rw-r--r--src/dhcp6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 583f3b3f..7f26129f 100644
--- a/src/dhcp6.c
+++ b/src/dhcp6.c
@@ -2187,14 +2187,14 @@ dhcp6_findpd(struct interface *ifp, const uint8_t *iaid,
continue;
}
+ ol--;
/* Check option length matches prefix length. */
if (((*o - a->prefix_len - 1) / NBBY) + 1 != ol) {
logerrx("%s: PD Exclude length mismatch", ifp->name);
continue;
}
-
a->prefix_exclude_len = *o++;
- ol--;
+
memcpy(&a->prefix_exclude, &a->prefix,
sizeof(a->prefix_exclude));
nb = a->prefix_len % NBBY;