# ifndef DISABLE_DUID
# define DISABLE_DUID
# endif
+# ifndef DISABLE_USERCLASS
+# define DISABLE_USERCLASS
+# endif
# ifndef DISABLE_VENDOR
# define DISABLE_VENDOR
# endif
# define ENABLE_DUID
#endif
+/* Allow dhcpcd to send user class options. */
+#ifndef DISABLE_USERCLASS
+# define ENABLE_USERCLASS
+#endif
+
/* Allow dhcpcd to send encapsulated vendor options (code 43).
* Although this is enabled by default, only custom networks would really
* need it. */
}
if (type != DHCP_DECLINE && type != DHCP_RELEASE) {
+#ifdef ENABLE_USERCLASS
if (options->userclass[0]) {
*p++ = DHCP_USERCLASS;
memcpy(p, options->userclass, options->userclass[0] + 1);
p += options->userclass[0] + 1;
}
+#endif
if (options->classid[0]) {
*p++ = DHCP_CLASSID;
}
break;
case 'u':
+#ifdef ENABLE_USERCLASS
if (options->userclass[0] + olen + 1 >= USERCLASS_MAX_LEN) {
logger(LOG_ERR,
"userclass overrun, max is %d",
*u++ = olen;
memcpy(u, oarg, olen);
options->userclass[0] += olen + 1;
+#endif
break;
case 'v':
#ifdef ENABLE_VENDOR
int fqdn;
uint8_t classid[CLASSID_MAX_LEN + 1];
char clientid[CLIENTID_MAX_LEN + 1];
+#ifdef ENABLE_USERCLASS
uint8_t userclass[USERCLASS_MAX_LEN + 1];
+#endif
#ifdef ENABLE_VENDOR
uint8_t vendor[VENDOR_MAX_LEN + 1];
#endif