NetBSD Problem Report #14935
Received: (qmail 13672 invoked from network); 13 Dec 2001 16:33:32 -0000
Message-Id: <200112120827.fBC8RtR05247@kaakeli.ssh.fi>
Date: Wed, 12 Dec 2001 01:27:55 -0700 (MST)
From: kivinen@ssh.fi
Reply-To: kivinen@ssh.fi
To: gnats-bugs@gnats.netbsd.org
Subject: Dhclient -nw does not work, it gives usage
X-Send-Pr-Version: 3.95
>Number: 14935
>Category: bin
>Synopsis: Dhclient -nw does not work, it gives usage
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 13 16:34:00 +0000 2001
>Closed-Date: Fri Dec 14 15:20:57 +0000 2001
>Last-Modified: Fri Dec 21 18:31:36 +0000 2012
>Originator: Tero Kivinen
>Release: NetBSD 1.5Y
>Organization:
SSH Communications Security
>Environment:
System: NetBSD kaakeli.ssh.fi 1.5Y NetBSD 1.5Y (KAAKELI) #47: Wed Oct 31 02:45:43 EET 2001 kivinen@kaakeli.acr.fi:/usr/src/sys/arch/i386/compile/KAAKELI i386
Architecture: i386
Machine: i386
>Description:
Dhclinet -nw gives usage instead working as described in the
man page. This same bug is present also in netbsd 1.5.2.
>How-To-Repeat:
run dhclient -nw and it gives you usage. The reason is that
-nw (and -e options) are checked after checking that if the
first character of the option is - and printing of usage.
>Fix:
--- /u/kivinen/Tmp/emacs_backups/,usr,src,dist,dhcp,client,dhclient.c.~0001~ Fri Aug 3 07:07:03 2001
+++ dhclient.c Sun Dec 9 10:08:19 2001
@@ -198,8 +198,6 @@
} 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,6 +214,8 @@
exit (0);
} else if (!strcmp (argv [i], "-nw")) {
nowait = 1;
+ } else if (argv [i][0] == '-') {
+ usage ();
} else {
struct interface_info *tmp = (struct interface_info *)0;
status = interface_allocate (&tmp, MDL);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz
State-Changed-When: Fri Dec 14 07:20:26 PST 2001
State-Changed-Why:
Thanks for the PR!
Will you make sure that this is included in the next DHCP release, or should I?
From: Thomas Klausner <wiz@netbsd.org>
To: kivinen@ssh.fi
Cc: gnats-bugs@netbsd.org
Subject: Re: bin/14935
Date: Mon, 17 Dec 2001 19:59:09 +0100
On Fri, Dec 14, 2001 at 03:20:55PM -0000, wiz@netbsd.org wrote:
> Synopsis: Dhclient -nw does not work, it gives usage
>
> State-Changed-From-To: open->closed
> State-Changed-By: wiz
> State-Changed-When: Fri Dec 14 07:20:26 PST 2001
> State-Changed-Why:
> Thanks for the PR!
> Will you make sure that this is included in the next DHCP release, or should I?
I filed a bug report with the dhcp maintainers.
Bye,
Thomas
--
Thomas Klausner - wiz@danbala.tuwien.ac.at
Language is not neutral. It is not merely a vehicle which carries ideas. It
is itself a shaper of ideas. -- Dale Spender
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.