summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/isakmpd.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-12-22 02:25:17 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-12-22 02:25:17 +0000
commit469283453fa7d725c88addb1f3cecb78399a2f36 (patch)
tree78ae3ac68fee8fa3df61c813bcea5d030d327347 /sbin/isakmpd/isakmpd.c
parent1811f757a04bf7d8b9e375df19433f5e7e42b65a (diff)
Generalize udp port decoding. Remove unneeded decls.
Diffstat (limited to 'sbin/isakmpd/isakmpd.c')
-rw-r--r--sbin/isakmpd/isakmpd.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c
index dafe9fbb544..8f14e18755e 100644
--- a/sbin/isakmpd/isakmpd.c
+++ b/sbin/isakmpd/isakmpd.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: isakmpd.c,v 1.5 1998/12/21 01:02:25 niklas Exp $ */
-/* $EOM: isakmpd.c,v 1.24 1998/12/01 10:18:43 niklas Exp $ */
+/* $OpenBSD: isakmpd.c,v 1.6 1998/12/22 02:25:16 niklas Exp $ */
+/* $EOM: isakmpd.c,v 1.25 1998/12/22 02:23:44 niklas Exp $ */
/*
* Copyright (c) 1998 Niklas Hallqvist. All rights reserved.
@@ -52,9 +52,6 @@
#include "udp.h"
#include "ui.h"
-extern char *optarg;
-extern int optind;
-
/*
* Set if -d is given, currently just for running in the foreground and log
* to stderr instead of syslog.
@@ -117,10 +114,14 @@ parse_args (int argc, char *argv[])
app_none++;
break;
case 'p':
- udp_default_port = atoi (optarg);
+ udp_default_port = udp_decode_port (optarg);
+ if (!udp_default_port)
+ exit (1);
break;
case 'P':
- udp_bind_port = atoi (optarg);
+ udp_bind_port = udp_decode_port (optarg);
+ if (!udp_bind_port)
+ exit (1);
break;
case 'r':
srandom (strtoul (optarg, NULL, 0));