summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhshoexer <hshoexer@openbsd.org>2006-03-20 17:09:38 +0000
committerhshoexer <hshoexer@openbsd.org>2006-03-20 17:09:38 +0000
commit33a3cc9981acf022c5fc45ad4449f4fe4bb772f6 (patch)
treeeb842190499c8c1c68e81b4cda34da7d9d29e30c
parentWhen adding a connection, do not explicitly start that connection (diff)
downloadwireguard-openbsd-33a3cc9981acf022c5fc45ad4449f4fe4bb772f6.tar.xz
wireguard-openbsd-33a3cc9981acf022c5fc45ad4449f4fe4bb772f6.zip
When being verbose while deleting ike rules (-dv), print deletions instead of
additions. Suggested by david@
-rw-r--r--sbin/ipsecctl/ike.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/ipsecctl/ike.c b/sbin/ipsecctl/ike.c
index bcd7cd905a7..223e4877319 100644
--- a/sbin/ipsecctl/ike.c
+++ b/sbin/ipsecctl/ike.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ike.c,v 1.19 2006/03/20 16:49:12 hshoexer Exp $ */
+/* $OpenBSD: ike.c,v 1.20 2006/03/20 17:09:38 hshoexer Exp $ */
/*
* Copyright (c) 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org>
*
@@ -378,11 +378,13 @@ ike_delete_config(struct ipsec_rule *r, FILE *fd)
return (0);
}
-/* ARGSUSED1 */
int
ike_print_config(struct ipsec_rule *r, int opts)
{
- return (ike_gen_config(r, stdout));
+ if (opts & IPSECCTL_OPT_DELETE)
+ return (ike_delete_config(r, stdout));
+ else
+ return (ike_gen_config(r, stdout));
}
int