[PATCH] udhcp: add 100 and 101 dhcp options for ipv4
Denys Vlasenko
vda.linux at googlemail.com
Sat Apr 13 14:29:38 UTC 2019
Applied, thanks
On Fri, Mar 8, 2019 at 3:34 PM Antoine Girard-Vallée
<antoine.girard-vallee at savoirfairelinux.com> wrote:
>
> Support for the IEEE timezone string and timezone database strings (100
> and 101 options respectively) is added for ipv4, conforming to RFC-4833.
>
> The two options are passed to hook scripts in the variables tzstr and
> tzdbstr.
>
> Signed-off-by: Antoine Girard-Vallée <antoine.girard-vallee at savoirfairelinux.com>
> ---
> networking/udhcp/common.c | 4 ++++
> networking/udhcp/common.h | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
> index fc4de5716..59cf723ee 100644
> --- a/networking/udhcp/common.c
> +++ b/networking/udhcp/common.c
> @@ -54,6 +54,8 @@ const struct dhcp_optflag dhcp_optflags[] = {
> { OPTION_STRING , 0x43 }, /* DHCP_BOOT_FILE */
> //TODO: not a string, but a set of LASCII strings:
> // { OPTION_STRING , 0x4D }, /* DHCP_USER_CLASS */
> + { OPTION_STRING , 0x64 }, /* DHCP_PCODE */
> + { OPTION_STRING , 0x65 }, /* DHCP_TCODE */
> #if ENABLE_FEATURE_UDHCP_RFC3397
> { OPTION_DNS_STRING | OPTION_LIST , 0x77 }, /* DHCP_DOMAIN_SEARCH */
> { OPTION_SIP_SERVERS , 0x78 }, /* DHCP_SIP_SERVERS */
> @@ -121,6 +123,8 @@ const char dhcp_option_strings[] ALIGN1 =
> "tftp" "\0" /* DHCP_TFTP_SERVER_NAME*/
> "bootfile" "\0" /* DHCP_BOOT_FILE */
> // "userclass" "\0" /* DHCP_USER_CLASS */
> + "tzstr" "\0" /* DHCP_PCODE */
> + "tzdbstr" "\0" /* DHCP_TCODE */
> #if ENABLE_FEATURE_UDHCP_RFC3397
> "search" "\0" /* DHCP_DOMAIN_SEARCH */
> // doesn't work in udhcpd.conf since OPTION_SIP_SERVERS
> diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
> index b68f9394e..b036dc54a 100644
> --- a/networking/udhcp/common.h
> +++ b/networking/udhcp/common.h
> @@ -148,6 +148,8 @@ enum {
> //#define DHCP_TFTP_SERVER_NAME 0x42 /* 66: same as 'sname' field */
> //#define DHCP_BOOT_FILE 0x43 /* 67: same as 'file' field */
> //#define DHCP_USER_CLASS 0x4d /* 77: RFC 3004. set of LASCII strings. "I am a printer" etc */
> +#define DHCP_PCODE 0x64 /* 100: RFC 4833. IEEE 1003.1 TZ string*/
> +#define DHCP_TCODE 0x65 /* 101: RFC 4833. Reference to the TZ database string*/
> #define DHCP_FQDN 0x51 /* 81: client asks to update DNS to map its FQDN to its new IP */
> //#define DHCP_DOMAIN_SEARCH 0x77 /* 119: RFC 3397. set of ASCIZ string, DNS-style compressed */
> //#define DHCP_SIP_SERVERS 0x78 /* 120: RFC 3361. flag byte, then: 0: domain names, 1: IP addrs */
> --
> 2.20.1
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
More information about the busybox
mailing list