]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Remove old check
authorRoy Marples <roy@marples.name>
Sat, 4 May 2019 09:12:39 +0000 (10:12 +0100)
committerRoy Marples <roy@marples.name>
Sat, 4 May 2019 09:12:39 +0000 (10:12 +0100)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index ed431be6bbc39b136b8178b585698f5524b16612..92ed9d0b7cdc827f750c8265e68dc084b551bac6 100644 (file)
--- 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));