summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-12-15 14:34:18 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-12-15 14:34:18 +0000
commitcbe4baf975e72b6beaffa0e215bc7aed74e1b801 (patch)
tree0884966bfc05950b0b3c91475e0e80f5e2605e5f
parenta5b4b9de527adef08083fa608e668476aebae424 (diff)
We run getopt() twice to know if dhcp-sync is used. To make this work
both getopt calls need the same optstring or the first getopt() call will end before parsing all arguments. Problem found and fixed supplied by m_athias OK millert@, deraadt@
-rw-r--r--usr.sbin/dhcpd/dhcpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcpd/dhcpd.c b/usr.sbin/dhcpd/dhcpd.c
index 7b8b0500857..43b6cde37f2 100644
--- a/usr.sbin/dhcpd/dhcpd.c
+++ b/usr.sbin/dhcpd/dhcpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.c,v 1.40 2010/07/03 04:44:51 guenther Exp $ */
+/* $OpenBSD: dhcpd.c,v 1.41 2010/12/15 14:34:17 claudio Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org>
@@ -82,7 +82,7 @@ main(int argc, char *argv[])
openlog_r(__progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY, &sdata);
opterr = 0;
- while ((ch = getopt(argc, argv, "Y:y:")) != -1)
+ while ((ch = getopt(argc, argv, "A:C:L:c:dfl:nY:y:")) != -1)
switch (ch) {
case 'Y':
syncsend = 1;