aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/client/dhclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/isc-dhcp/client/dhclient.c')
-rw-r--r--contrib/isc-dhcp/client/dhclient.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/isc-dhcp/client/dhclient.c b/contrib/isc-dhcp/client/dhclient.c
index 03aff6254ba6..39edb87b9c46 100644
--- a/contrib/isc-dhcp/client/dhclient.c
+++ b/contrib/isc-dhcp/client/dhclient.c
@@ -41,7 +41,7 @@
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.129.2.9 2002/02/20 07:16:31 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.129.2.10 2002/04/26 23:33:05 murray Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -198,8 +198,6 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "-w")) {
/* do not exit if there are no broadcast interfaces. */
persist = 1;
- } else if (argv [i][0] == '-') {
- usage ();
} else if (!strcmp (argv [i], "-e")) {
struct string_list *tmp;
if (++i == argc)
@@ -216,7 +214,9 @@ int main (argc, argv, envp)
exit (0);
} else if (!strcmp (argv [i], "-nw")) {
nowait = 1;
- } else {
+ } else if (argv [i][0] == '-') {
+ usage ();
+ } else {
struct interface_info *tmp = (struct interface_info *)0;
status = interface_allocate (&tmp, MDL);
if (status != ISC_R_SUCCESS)
@@ -1872,6 +1872,7 @@ void make_discover (client, lease)
(struct option_state *)0, options,
&global_scope, 0, 0, 0, (struct data_string *)0,
client -> config -> vendor_space_name);
+ option_state_dereference (&options, MDL);
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
@@ -1938,6 +1939,7 @@ void make_request (client, lease)
(struct option_state *)0, client -> sent_options,
&global_scope, 0, 0, 0, (struct data_string *)0,
client -> config -> vendor_space_name);
+ option_state_dereference (&client -> sent_options, MDL);
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
@@ -2008,6 +2010,7 @@ void make_decline (client, lease)
(struct option_state *)0, options,
&global_scope, 0, 0, 0, (struct data_string *)0,
client -> config -> vendor_space_name);
+ option_state_dereference (&options, MDL);
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
option_state_dereference (&options, MDL);