-@@ -56,6 +56,8 @@ const struct dhcp_optflag dhcp_optflags[] = {
+@@ -60,6 +60,8 @@ const struct dhcp_optflag dhcp_optflags[
+ { OPTION_U8 , 0x85 }, /* DHCP_VLAN_PRIORITY */
{ OPTION_STATIC_ROUTES , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */
+ { OPTION_6RD , 0xd4 }, /* DHCP_6RD (RFC) */
+ { OPTION_6RD , 0x96 }, /* DHCP_6RD (Comcast) */
{ OPTION_STRING , 0xfc }, /* DHCP_WPAD */
/* Options below have no match in dhcp_option_strings[],
{ OPTION_STATIC_ROUTES , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */
+ { OPTION_6RD , 0xd4 }, /* DHCP_6RD (RFC) */
+ { OPTION_6RD , 0x96 }, /* DHCP_6RD (Comcast) */
{ OPTION_STRING , 0xfc }, /* DHCP_WPAD */
/* Options below have no match in dhcp_option_strings[],
-@@ -118,6 +120,8 @@ const char dhcp_option_strings[] ALIGN1 =
- // doesn't work in udhcpd.conf since OPTION_STATIC_ROUTES
- // is not handled yet by "string->option" conversion code:
- "staticroutes" "\0"/* DHCP_STATIC_ROUTES */
+@@ -127,6 +129,8 @@ const char dhcp_option_strings[] ALIGN1
+ "vlanpriority" "\0"/* DHCP_VLAN_PRIORITY */
+ #endif
+ "msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */
[OPTION_S32] = 4,
/* Just like OPTION_STRING, we use minimum length here */
[OPTION_STATIC_ROUTES] = 5,
[OPTION_S32] = 4,
/* Just like OPTION_STRING, we use minimum length here */
[OPTION_STATIC_ROUTES] = 5,
#if ENABLE_FEATURE_UDHCP_RFC3397
OPTION_DNS_STRING, /* RFC1035 compressed domain name list */
OPTION_SIP_SERVERS,
#if ENABLE_FEATURE_UDHCP_RFC3397
OPTION_DNS_STRING, /* RFC1035 compressed domain name list */
OPTION_SIP_SERVERS,
[OPTION_IP ] = sizeof("255.255.255.255 "),
[OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
[OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
[OPTION_IP ] = sizeof("255.255.255.255 "),
[OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
[OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
[OPTION_STRING ] = 1,
#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_DNS_STRING ] = 1, /* unused */
[OPTION_STRING ] = 1,
#if ENABLE_FEATURE_UDHCP_RFC3397
[OPTION_DNS_STRING ] = 1, /* unused */
-@@ -68,6 +69,23 @@ static int sprint_nip(char *dest, const char *pre, const uint8_t *ip)
+@@ -123,6 +124,23 @@ static int sprint_nip(char *dest, const
return sprintf(dest, "%s%u.%u.%u.%u", pre, ip[0], ip[1], ip[2], ip[3]);
}
return sprintf(dest, "%s%u.%u.%u.%u", pre, ip[0], ip[1], ip[2], ip[3]);
}
/* really simple implementation, just count the bits */
static int mton(uint32_t mask)
{
/* really simple implementation, just count the bits */
static int mton(uint32_t mask)
{
-@@ -177,6 +195,70 @@ static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_
+@@ -232,6 +250,70 @@ static NOINLINE char *xmalloc_optname_op