summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/isakmpd.c
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2004-06-23 00:56:00 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2004-06-23 00:56:00 +0000
commit8e90f25e8cf2bb4b4cce48c6fa1dded9f31dc090 (patch)
tree7441dfd09ce234abb73bcb4b42333d9e8ccb7094 /sbin/isakmpd/isakmpd.c
parentacce9a930be20f29a7dd105778e38c4303d9a07b (diff)
Add commandline switch -a / config tag "Acquire-Only" to tell isakmpd to not
touch flows. initial work by markus ok markus@ ho@ henning@
Diffstat (limited to 'sbin/isakmpd/isakmpd.c')
-rw-r--r--sbin/isakmpd/isakmpd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c
index 6d0f6cf246f..bb871fe9da9 100644
--- a/sbin/isakmpd/isakmpd.c
+++ b/sbin/isakmpd/isakmpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isakmpd.c,v 1.65 2004/06/20 15:03:35 ho Exp $ */
+/* $OpenBSD: isakmpd.c,v 1.66 2004/06/23 00:55:59 hshoexer Exp $ */
/* $EOM: isakmpd.c,v 1.54 2000/10/05 09:28:22 niklas Exp $ */
/*
@@ -73,6 +73,9 @@ static void usage(void);
*/
int debug = 0;
+/* Set when no policy file is found. */
+int acquire_only = 0;
+
/*
* If we receive a SIGHUP signal, this flag gets set to show we need to
* reconfigure ASAP.
@@ -114,7 +117,7 @@ static void
usage(void)
{
fprintf(stderr,
- "usage: %s [-4] [-6] [-c config-file] [-d] [-D class=level]\n"
+ "usage: %s [-4] [-6] [-a] [-c config-file] [-d] [-D class=level]\n"
" [-f fifo] [-i pid-file] [-n] [-p listen-port]\n"
" [-P local-port] [-L] [-l packetlog-file] [-r seed]\n"
" [-R report-file] [-v]\n",
@@ -132,7 +135,7 @@ parse_args(int argc, char *argv[])
int do_packetlog = 0;
#endif
- while ((ch = getopt(argc, argv, "46c:dD:f:i:np:P:Ll:r:R:v")) != -1) {
+ while ((ch = getopt(argc, argv, "46ac:dD:f:i:np:P:Ll:r:R:v")) != -1) {
switch (ch) {
case '4':
bind_family |= BIND_FAMILY_INET4;
@@ -142,6 +145,10 @@ parse_args(int argc, char *argv[])
bind_family |= BIND_FAMILY_INET6;
break;
+ case 'a':
+ acquire_only++;
+ break;
+
case 'c':
conf_path = optarg;
break;