DHCP 4.1.0a1 - double dereference

Yeung, Pauline yeungp at cisco.com
Thu May 22 03:24:40 UTC 2008


In ISC DHCP 4.1.0a1 client/dhclient.c, option_state_dereference() is
called twice in make_decline().  When DHCP client sends a DHCPDECLINE, I
get the following error message in syslog.

  dhclient.c(2262): null pointer

This error is not fatal, but it seems unnecessary to call
option_state_dereference() twice.

2237 void make_decline (client, lease)
2238     struct client_state *client;
2239     struct client_lease *lease;
2240 {
2241     unsigned char decline = DHCPDECLINE;
2242     struct option_cache *oc;
2243
2244     struct option_state *options = (struct option_state *)0;
2245
2246     oc = lookup_option (&dhcp_universe, lease -> options,
2247                 DHO_DHCP_SERVER_IDENTIFIER);
2248     make_client_options(client, lease, &decline, oc,
&lease->address,
2249                 NULL, &options);
2250
2251     /* Set up the option buffer... */
2252     memset (&client -> packet, 0, sizeof (client -> packet));
2253     client -> packet_length =
2254         cons_options ((struct packet *)0, &client -> packet,
2255                   (struct lease *)0, client, 0,
2256                   (struct option_state *)0, options,
2257                   &global_scope, 0, 0, 0, (struct data_string *)0,
2258                   client -> config -> vendor_space_name);
2259     option_state_dereference (&options, MDL);
2260     if (client -> packet_length < BOOTP_MIN_LEN)
2261         client -> packet_length = BOOTP_MIN_LEN;
2262     option_state_dereference (&options, MDL);


Pauline Yeung
Cisco Systems, Inc.





     - - - - -                              Cisco                            - - - - -         
This e-mail and any attachments may contain information which is confidential, 
proprietary, privileged or otherwise protected by law. The information is solely 
intended for the named addressee (or a person responsible for delivering it to 
the addressee). If you are not the intended recipient of this message, you are 
not authorized to read, print, retain, copy or disseminate this message or any 
part of it. If you have received this e-mail in error, please notify the sender 
immediately by return e-mail and delete it from your computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20080521/4cdf9e46/attachment.html>


More information about the dhcp-users mailing list