]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP6: Fix sending custom vendor class option.
authorRoy Marples <roy@marples.name>
Thu, 19 Apr 2018 10:09:09 +0000 (11:09 +0100)
committerRoy Marples <roy@marples.name>
Thu, 19 Apr 2018 10:09:09 +0000 (11:09 +0100)
src/dhcp6.c
src/if-options.c

index 1fd644fcfa7b2a8808024a591e30be3df59e065a..6e470a988551e973d05e2f2a6fa99681f07d486a 100644 (file)
@@ -287,7 +287,7 @@ dhcp6_makevendor(void *data, const struct interface *ifp)
                        {
                                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;
                        }
index d0feadddfd969d735e66465e79675cf3e08aa5e4..4eb6e6eaecaa98487c5892d31637b8626a7a63f5 100644 (file)
@@ -1850,6 +1850,7 @@ err_sla:
                        logerrx("invalid code: %s", arg);
                        return -1;
                }
+               fp = strskipwhite(fp);
                if (fp) {
                        s = parse_string(NULL, 0, fp);
                        if (s == -1) {