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
commitd30538898e39cc9a49ced4e67e91013d1d84a2c2 (patch)
tree0d6e36d52d12b456c8d9a4b7f809da5cff93a42f
parentba146897a3c8268406a6553533f79057d21ee0b1 (diff)
downloaddhcpcd-7.2.2.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;