[PATCH] dhcp: add RFC5970 options to dhcp

Jiri Popelka jpopelka at redhat.com
Thu Mar 1 09:58:19 UTC 2012


On 02/29/2012 07:07 PM, Neil Horman wrote:
> diff -up ./common/tables.c.orig ./common/tables.c
> --- ./common/tables.c.orig	2011-05-20 10:33:27.000000000 -0400
> +++ ./common/tables.c	2012-02-29 12:03:22.610000294 -0500
> @@ -459,6 +459,17 @@ static struct option dhcpv6_options[] =
>   	{ "lq-relay-data", "6X",		&dhcpv6_universe, 47, 1 },
>   	{ "lq-client-link", "6A",		&dhcpv6_universe, 48, 1 },
>
> +			/* RFC5970 OPTIONS */
> +	{ "bootfile-url", "t",			&dhcpv6_universe, 59, 1},
> +#if 0
> +	/* Can't implement this until arrays of strings with length "StA"
> +	 * are implemented
> +	 */
> +	{ "bootfile-param", "StA",		&dhcpv6_universe, 60, 1},
> +#endif
> +	{ "arch-type", "Sa",			&dhcpv6_universe, 61, 1},
> +	{ "net-id", "BA",			&dhcpv6_universe, 62, 1},

Shouldn't the net-id be defined as
	{ "net-id", "BBB",		&dhcpv6_universe, 62, 1},
?

RFC5970 says:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           OPTION_NII          |          option-len           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |     Type      |     Major     |      Minor      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    option-code       OPTION_NII (62).
    option-len        3


--
Jiri


More information about the dhcp-hackers mailing list