changeset 4507:af0b9d1469cc draft dhcpcd-6

Remove old check
author Roy Marples <roy@marples.name>
date Sat, 04 May 2019 10:12:39 +0100
parents ab55a1553b05
children a3d0519e2e9d
files dhcp6.c
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/dhcp6.c	Fri May 03 14:44:06 2019 +0100
+++ b/dhcp6.c	Sat May 04 10:12:39 2019 +0100
@@ -1992,22 +1992,14 @@
 		}
 
 		/* 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));