summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/dhcpd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2006-05-11 01:19:09 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2006-05-11 01:19:09 +0000
commitd38d8fdc9dfad44e06115fb8a446df20dc031781 (patch)
tree8a8c8a76e7c1363a084d7134109d55eadb232efe /usr.sbin/dhcpd/dhcpd.c
parent5c63d182406271b85863839f3a5bb71c76a2b955 (diff)
If a list of interfaces is supplied via the command line or
dhcpd.interfaces then a) don't bother looking up information on interfaces that were not requested; b) don't exit if a requested interface is not found, just issue a warning message; c) exit if none of the interfaces were found. The command line for dhcpd shown in ps will continue to show requested but ignored interfaces. As usual with dhc* code, whack a bunch of unused states, constants, flags, etc. Since we only invoke discover_interfaces() with DISCOVER_SERVER, there is no need to keep track of other possibilities.
Diffstat (limited to 'usr.sbin/dhcpd/dhcpd.c')
-rw-r--r--usr.sbin/dhcpd/dhcpd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/dhcpd/dhcpd.c b/usr.sbin/dhcpd/dhcpd.c
index 657867c0792..a2ba8fc4bc6 100644
--- a/usr.sbin/dhcpd/dhcpd.c
+++ b/usr.sbin/dhcpd/dhcpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.c,v 1.24 2005/05/23 22:54:55 henning Exp $ */
+/* $OpenBSD: dhcpd.c,v 1.25 2006/05/11 01:19:08 krw Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org>
@@ -101,7 +101,6 @@ main(int argc, char *argv[])
error("calloc");
strlcpy(tmp->name, argv[0], sizeof(tmp->name));
tmp->next = interfaces;
- tmp->flags = INTERFACE_REQUESTED;
interfaces = tmp;
argc--;
argv++;
@@ -121,7 +120,7 @@ main(int argc, char *argv[])
exit(0);
db_startup();
- discover_interfaces(DISCOVER_SERVER);
+ discover_interfaces();
icmp_startup(1, lease_pinged);
if ((pw = getpwnam("_dhcp")) == NULL)