summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorPierre-Yves Ritschard <pyr@cvs.openbsd.org>2008-05-12 19:15:03 +0000
committerPierre-Yves Ritschard <pyr@cvs.openbsd.org>2008-05-12 19:15:03 +0000
commit87c7985f57f39ae3881695f2fc5b7079ab63c6b0 (patch)
tree3690460aeda8b64e13fee3f2d75588071eaf260e /sbin/isakmpd
parent970ec1da0136707fa8b46e7b91d99c0d75e50d29 (diff)
Error out with usage line if additional arguments are given after the
option parsing. Found out the hard way by jdixon on ifstated. ok sobrado@, jdixon@, millert@
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/isakmpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c
index c9edeb6851f..5522ac9a2fb 100644
--- a/sbin/isakmpd/isakmpd.c
+++ b/sbin/isakmpd/isakmpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isakmpd.c,v 1.96 2007/04/02 08:08:32 moritz Exp $ */
+/* $OpenBSD: isakmpd.c,v 1.97 2008/05/12 19:15:02 pyr Exp $ */
/* $EOM: isakmpd.c,v 1.54 2000/10/05 09:28:22 niklas Exp $ */
/*
@@ -234,6 +234,9 @@ parse_args(int argc, char *argv[])
argc -= optind;
argv += optind;
+ if (argc > 0)
+ usage();
+
if (do_packetlog && !pcap_file)
pcap_file = PCAP_FILE_DEFAULT;
}