diff options
| author | Vladislav Grishenko <themiron@mail.ru> | 2010-09-26 00:15:12 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-09-26 00:15:12 +0200 |
| commit | 7d3a48a003cd645edfae2b404493688022b13193 (patch) | |
| tree | eaf4054087dda457b78890781ac8ab77cc748788 | |
| parent | 04bcd998ca48954db738232f46fe3dfc273db36a (diff) | |
| download | busybox-w32-7d3a48a003cd645edfae2b404493688022b13193.tar.gz busybox-w32-7d3a48a003cd645edfae2b404493688022b13193.tar.bz2 busybox-w32-7d3a48a003cd645edfae2b404493688022b13193.zip | |
udhcp: add support for 0x21 ROUTES and 0xf9 MS_STATIC_ROUTES options
Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | networking/udhcp/common.c | 4 | ||||
| -rw-r--r-- | networking/udhcp/common.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 97ab4cdbb..b6b274d91 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
| @@ -37,6 +37,7 @@ const struct dhcp_optflag dhcp_optflags[] = { | |||
| 37 | { OPTION_U8 , 0x17 }, /* DHCP_IP_TTL */ | 37 | { OPTION_U8 , 0x17 }, /* DHCP_IP_TTL */ |
| 38 | { OPTION_U16 , 0x1a }, /* DHCP_MTU */ | 38 | { OPTION_U16 , 0x1a }, /* DHCP_MTU */ |
| 39 | { OPTION_IP | OPTION_REQ, 0x1c }, /* DHCP_BROADCAST */ | 39 | { OPTION_IP | OPTION_REQ, 0x1c }, /* DHCP_BROADCAST */ |
| 40 | { OPTION_IP_PAIR | OPTION_LIST , 0x21 }, /* DHCP_ROUTES */ | ||
| 40 | { OPTION_STRING , 0x28 }, /* DHCP_NIS_DOMAIN */ | 41 | { OPTION_STRING , 0x28 }, /* DHCP_NIS_DOMAIN */ |
| 41 | { OPTION_IP | OPTION_LIST , 0x29 }, /* DHCP_NIS_SERVER */ | 42 | { OPTION_IP | OPTION_LIST , 0x29 }, /* DHCP_NIS_SERVER */ |
| 42 | { OPTION_IP | OPTION_LIST | OPTION_REQ, 0x2a }, /* DHCP_NTP_SERVER */ | 43 | { OPTION_IP | OPTION_LIST | OPTION_REQ, 0x2a }, /* DHCP_NTP_SERVER */ |
| @@ -54,6 +55,7 @@ const struct dhcp_optflag dhcp_optflags[] = { | |||
| 54 | { OPTION_SIP_SERVERS , 0x78 }, /* DHCP_SIP_SERVERS */ | 55 | { OPTION_SIP_SERVERS , 0x78 }, /* DHCP_SIP_SERVERS */ |
| 55 | #endif | 56 | #endif |
| 56 | { OPTION_STATIC_ROUTES , 0x79 }, /* DHCP_STATIC_ROUTES */ | 57 | { OPTION_STATIC_ROUTES , 0x79 }, /* DHCP_STATIC_ROUTES */ |
| 58 | { OPTION_STATIC_ROUTES , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */ | ||
| 57 | { OPTION_STRING , 0xfc }, /* DHCP_WPAD */ | 59 | { OPTION_STRING , 0xfc }, /* DHCP_WPAD */ |
| 58 | 60 | ||
| 59 | /* Options below have no match in dhcp_option_strings[], | 61 | /* Options below have no match in dhcp_option_strings[], |
| @@ -95,6 +97,7 @@ const char dhcp_option_strings[] ALIGN1 = | |||
| 95 | "ipttl" "\0" /* DHCP_IP_TTL */ | 97 | "ipttl" "\0" /* DHCP_IP_TTL */ |
| 96 | "mtu" "\0" /* DHCP_MTU */ | 98 | "mtu" "\0" /* DHCP_MTU */ |
| 97 | "broadcast" "\0" /* DHCP_BROADCAST */ | 99 | "broadcast" "\0" /* DHCP_BROADCAST */ |
| 100 | "routes" "\0" /* DHCP_ROUTES */ | ||
| 98 | "nisdomain" "\0" /* DHCP_NIS_DOMAIN */ | 101 | "nisdomain" "\0" /* DHCP_NIS_DOMAIN */ |
| 99 | "nissrv" "\0" /* DHCP_NIS_SERVER */ | 102 | "nissrv" "\0" /* DHCP_NIS_SERVER */ |
| 100 | "ntpsrv" "\0" /* DHCP_NTP_SERVER */ | 103 | "ntpsrv" "\0" /* DHCP_NTP_SERVER */ |
| @@ -114,6 +117,7 @@ const char dhcp_option_strings[] ALIGN1 = | |||
| 114 | // doesn't work in udhcpd.conf since OPTION_STATIC_ROUTES | 117 | // doesn't work in udhcpd.conf since OPTION_STATIC_ROUTES |
| 115 | // is not handled yet by "string->option" conversion code: | 118 | // is not handled yet by "string->option" conversion code: |
| 116 | "staticroutes" "\0"/* DHCP_STATIC_ROUTES */ | 119 | "staticroutes" "\0"/* DHCP_STATIC_ROUTES */ |
| 120 | "msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */ | ||
| 117 | "wpad" "\0" /* DHCP_WPAD */ | 121 | "wpad" "\0" /* DHCP_WPAD */ |
| 118 | ; | 122 | ; |
| 119 | 123 | ||
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index c5abf17d5..9020b9c96 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
| @@ -123,6 +123,7 @@ enum { | |||
| 123 | //#define DHCP_IP_TTL 0x17 | 123 | //#define DHCP_IP_TTL 0x17 |
| 124 | //#define DHCP_MTU 0x1a | 124 | //#define DHCP_MTU 0x1a |
| 125 | //#define DHCP_BROADCAST 0x1c | 125 | //#define DHCP_BROADCAST 0x1c |
| 126 | //#define DHCP_ROUTES 0x21 | ||
| 126 | //#define DHCP_NIS_DOMAIN 0x28 | 127 | //#define DHCP_NIS_DOMAIN 0x28 |
| 127 | //#define DHCP_NIS_SERVER 0x29 | 128 | //#define DHCP_NIS_SERVER 0x29 |
| 128 | //#define DHCP_NTP_SERVER 0x2a | 129 | //#define DHCP_NTP_SERVER 0x2a |
| @@ -144,6 +145,7 @@ enum { | |||
| 144 | //#define DHCP_DOMAIN_SEARCH 0x77 /* RFC 3397. set of ASCIZ string, DNS-style compressed */ | 145 | //#define DHCP_DOMAIN_SEARCH 0x77 /* RFC 3397. set of ASCIZ string, DNS-style compressed */ |
| 145 | //#define DHCP_SIP_SERVERS 0x78 /* RFC 3361. flag byte, then: 0: domain names, 1: IP addrs */ | 146 | //#define DHCP_SIP_SERVERS 0x78 /* RFC 3361. flag byte, then: 0: domain names, 1: IP addrs */ |
| 146 | //#define DHCP_STATIC_ROUTES 0x79 /* RFC 3442. (mask,ip,router) tuples */ | 147 | //#define DHCP_STATIC_ROUTES 0x79 /* RFC 3442. (mask,ip,router) tuples */ |
| 148 | //#define DHCP_MS_STATIC_ROUTES 0xf9 /* Microsoft's pre-RFC 3442 code for 0x79? */ | ||
| 147 | //#define DHCP_WPAD 0xfc /* MSIE's Web Proxy Autodiscovery Protocol */ | 149 | //#define DHCP_WPAD 0xfc /* MSIE's Web Proxy Autodiscovery Protocol */ |
| 148 | #define DHCP_END 0xff | 150 | #define DHCP_END 0xff |
| 149 | 151 | ||
