From: Roy Marples Date: Sat, 4 May 2019 09:12:39 +0000 (+0100) Subject: Remove old check X-Git-Tag: v6.11.7~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c91009085b337e1edc54fdece26b7b5327fc8da;p=thirdparty%2Fdhcpcd.git Remove old check --- diff --git a/dhcp6.c b/dhcp6.c index ed431be6..92ed9d0b 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -1992,22 +1992,14 @@ dhcp6_findpd(struct interface *ifp, const uint8_t *iaid, } /* Check option length matches prefix length. */ + ol--; if (((*op - a->prefix_len - 1) / NBBY) + 1 != ol) { logger(ifp->ctx, LOG_ERR, "%s: PD Exclude length mismatch", ifp->name); continue; } - a->prefix_exclude_len = *op++; - ol--; - if (((a->prefix_exclude_len - a->prefix_len - 1) / NBBY) + 1 - != ol) - { - logger(ifp->ctx, LOG_ERR, - "%s: PD Exclude length mismatch", ifp->name); - a->prefix_exclude_len = 0; - continue; - } + u8 = a->prefix_len % NBBY; memcpy(&a->prefix_exclude, &a->prefix, sizeof(a->prefix_exclude));