udhcp: add PXELINUX path prefix option (code 210) definition
authorJeremy Kerr <jk@ozlabs.org>
Tue, 15 Jul 2014 03:03:17 +0000 (11:03 +0800)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 16 Jul 2014 12:21:42 +0000 (14:21 +0200)
Like d3092c99, this change adds support for the DHCP "path-prefix"
option, as defined in RFC 5071. We use the string identifer
"pxepathprefix".

Adding this option makes string parsing in the hook scripts simpler.

function                                             old     new   delta
dhcp_option_strings                                  255     269     +14
dhcp_optflags                                         72      74      +2

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/common.c
networking/udhcp/common.h

index fe322db4ffed64851528b9aae06a6760e90eb52a..bc41c8d4d8e2a2fe321838f3c2ae0531c7aa7caa 100644 (file)
@@ -63,6 +63,7 @@ const struct dhcp_optflag dhcp_optflags[] = {
        { OPTION_U8                               , 0x85 }, /* DHCP_VLAN_PRIORITY */
 #endif
        { OPTION_STRING                           , 0xd1 }, /* DHCP_PXE_CONF_FILE */
+       { OPTION_STRING                           , 0xd2 }, /* DHCP_PXE_PATH_PREFIX */
        { OPTION_6RD                              , 0xd4 }, /* DHCP_6RD           */
        { OPTION_STATIC_ROUTES | OPTION_LIST      , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */
        { OPTION_STRING                           , 0xfc }, /* DHCP_WPAD          */
@@ -130,6 +131,7 @@ const char dhcp_option_strings[] ALIGN1 =
        "vlanpriority" "\0"/* DHCP_VLAN_PRIORITY  */
 #endif
        "pxeconffile" "\0" /* DHCP_PXE_CONF_FILE  */
+       "pxepathprefix" "\0" /* DHCP_PXE_PATH_PREFIX  */
        "ip6rd" "\0"       /* DHCP_6RD            */
        "msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */
        "wpad" "\0"        /* DHCP_WPAD           */
index 5e70d609fd3fd2ba5dbf7fa4a0752e2aa7b2a13f..e5e0f2599f6395d10c7abac350a4efdb1afdc3d8 100644 (file)
@@ -152,6 +152,7 @@ enum {
 //#define DHCP_VLAN_ID          0x84 /* 802.1P VLAN ID */
 //#define DHCP_VLAN_PRIORITY    0x85 /* 802.1Q VLAN priority */
 //#define DHCP_PXE_CONF_FILE    0xd1 /* RFC 5071 Configuration File */
+//#define DHCP_PXE_PATH_PREFIX  0xd2 /* RFC 5071 Configuration File */
 //#define DHCP_MS_STATIC_ROUTES 0xf9 /* Microsoft's pre-RFC 3442 code for 0x79? */
 //#define DHCP_WPAD             0xfc /* MSIE's Web Proxy Autodiscovery Protocol */
 #define DHCP_END                0xff