changeset 4260:8c6250af2ed4 draft

DHCP6: Fix sending custom vendor class option.
author Roy Marples <roy@marples.name>
date Thu, 19 Apr 2018 11:09:09 +0100
parents bf08893bc7fd
children 3879ca166a05
files src/dhcp6.c src/if-options.c
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp6.c	Wed Apr 18 20:33:50 2018 +0100
+++ b/src/dhcp6.c	Thu Apr 19 11:09:09 2018 +0100
@@ -287,7 +287,7 @@
 			{
 				hvlen = htons((uint16_t)vivco->len);
 				memcpy(p, &hvlen, sizeof(hvlen));
-				p += sizeof(len);
+				p += sizeof(hvlen);
 				memcpy(p, vivco->data, vivco->len);
 				p += vivco->len;
 			}
--- a/src/if-options.c	Wed Apr 18 20:33:50 2018 +0100
+++ b/src/if-options.c	Thu Apr 19 11:09:09 2018 +0100
@@ -1850,6 +1850,7 @@
 			logerrx("invalid code: %s", arg);
 			return -1;
 		}
+		fp = strskipwhite(fp);
 		if (fp) {
 			s = parse_string(NULL, 0, fp);
 			if (s == -1) {