diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2006-03-20 17:09:39 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2006-03-20 17:09:39 +0000 |
commit | f289dd83a29c9231b0e0a981ad5c3218b24b90c0 (patch) | |
tree | 733ed28fc0777974bdc18725db10da6a0c518b15 /sbin | |
parent | 4bc88f3a09384ae7a1067cbc3f129b74307cc4d8 (diff) |
When being verbose while deleting ike rules (-dv), print deletions instead of
additions. Suggested by david@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipsecctl/ike.c | 8 |
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 |