tags + 202264 moreinfo thanks Hi Philipp,
I've taken a look at this patch, but unfortunately in the 2 years and 54
days since you submitted this bug, the dhcp3-client code has changed a
lot.
Can you tell me if the problem still exists, and if it does, would you
mind submitting an updated patch?
regards
Andrew
On Mon, Jul 21, 2003 at 12:52:35PM +0200, Philipp Matthias Hahn wrote:
> Package: dhcp3-client
> Version: 3.0+3.0.1rc11-5
> Severity: normal
> Tags: patch upstream
>
> FAI (fully automatic installation) would like to defines user options in
> /etc/dhcp3/dhclient.conf and use them to determine what action to take.
> At the moment, this doesn't work because of a bug in dhcp3-client. If
> you add the lines
> option fai-action code 171 = text;
> request fai-action;
> you get an error that 'fai-action' is not a valid option.
>
> What goes wrong is this:
>
> common/tables.c:1178 dhcp_universe.options [i] = &dhcp_options [i];
> The dhcp_universe gets initialized by referencing the options
> from the dhcp_options array.
>
> client/clparse.c:377 option = parse_option_name (cfile, 1, &known);
> common/parse.c:879 universe = &dhcp_universe;
> common/parse.c:895 option = new_option (MDL);
> common/parse.c:907 option -> universe = universe;
> The new option gets defines in the dhcp_universe, but _not_ in
> dhcp_options!
>
> client/clparse.c:420 parse_option_list (cfile, &config -> required_options);
> client/clparse.c:636 if (!strcasecmp (dhcp_options [i].name, val))
> The option name is compared against dhcp_options, where it
> wasn't added.
>
> How to fix it:
> I don't know, if dhcp_options[] is supposed to be an immutable array or
> if it should be updated to keep it in sync with dhcp_universe.options.
> Depending on this question, the following simple patch might be
> sufficient or might be the wrong solution:
>
> --- dhcp3-3.0+3.0.1rc11/client/clparse.c~ 2002-11-17 03:25:43.000000000
> +0100
> +++ dhcp3-3.0+3.0.1rc11/client/clparse.c 2003-07-21 09:31:12.000000000
> +0200
> @@ -633,7 +633,7 @@ void parse_option_list (cfile, list)
> return;
> }
> for (i = 0; i < 256; i++) {
> - if (!strcasecmp (dhcp_options [i].name, val))
> + if (!strcasecmp (dhcp_universe.options [i]->name, val))
> break;
> }
> if (i == 256) {
>
> -- System Information:
> Debian Release: testing/unstable
> Architecture: i386
> Kernel: Linux walker 2.4.22-pre7 #2 Sam Jul 19 11:26:49 CEST 2003 i686
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=en_US.UTF-8
>
> Versions of packages dhcp3-client depends on:
> ii debconf 1.3.4 Debian configuration management
> sy
> ii debianutils 2.5.4 Miscellaneous utilities specific
> t
> ii dhcp3-common 3.0+3.0.1rc11-5 Common files used by all the
> dhcp3
> ii libc6 2.3.1-17 GNU C Library: Shared libraries
> an
>
> -- no debconf information
>
>
>
signature.asc
Description: Digital signature

