# HG changeset patch # User Roy Marples # Date 1590652933 -3600 # Node ID b7d18124ad21fca12748eb5aece9a71a785981a8 # Parent f0c6e0c1d52ac83212fed8de38072f4a2bddf268 DHCP6: Revert part of prior - only allow vendorclassid to disable Not set. dhcpcd owns the IANA_PEN defined. Either use it as is, or get your own. This restores the prior behaviour but still allows the option as a whole to be disabled by vendorclassid being disabled. diff -r f0c6e0c1d52a -r b7d18124ad21 src/dhcp6.c --- a/src/dhcp6.c Wed May 27 23:34:16 2020 +0100 +++ b/src/dhcp6.c Thu May 28 09:02:13 2020 +0100 @@ -274,7 +274,9 @@ vlen += sizeof(uint16_t) + vivco->len; len += vlen; } else if (ifo->vendorclassid[0] != '\0') { - vlen = (size_t)ifo->vendorclassid[0]; + /* dhcpcd owns DHCPCD_IANA_PEN. + * If you need your own string, get your own IANA PEN. */ + vlen = strlen(ifp->ctx->vendor); len += sizeof(uint16_t) + vlen; } else return 0; @@ -312,7 +314,7 @@ hvlen = htons((uint16_t)vlen); memcpy(p, &hvlen, sizeof(hvlen)); p += sizeof(hvlen); - memcpy(p, ifo->vendorclassid + 1, (size_t)vlen); + memcpy(p, ifp->ctx->vendor, vlen); } }