summaryrefslogtreecommitdiff
path: root/sbin/ipsecctl
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2005-12-06 16:55:29 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2005-12-06 16:55:29 +0000
commit777c7b4c6b10ef9e77ae6e59d0805f2dcc6f90f3 (patch)
treec1a00855693dd4046396e73953d22fedd74c1281 /sbin/ipsecctl
parent235e819c9ad494bab9f79c55db5422d1a6b1f9bf (diff)
more appropriate error messages; ok hshoexer
Diffstat (limited to 'sbin/ipsecctl')
-rw-r--r--sbin/ipsecctl/ipsecctl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/ipsecctl/ipsecctl.c b/sbin/ipsecctl/ipsecctl.c
index 7e824574b73..c8af85a0811 100644
--- a/sbin/ipsecctl/ipsecctl.c
+++ b/sbin/ipsecctl/ipsecctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsecctl.c,v 1.38 2005/12/06 14:27:57 markus Exp $ */
+/* $OpenBSD: ipsecctl.c,v 1.39 2005/12/06 16:55:28 markus Exp $ */
/*
* Copyright (c) 2004, 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org>
*
@@ -151,10 +151,14 @@ ipsecctl_commit(int action, struct ipsecctl *ipsec)
if (rp->type & RULE_IKE) {
if (ike_ipsec_establish(action, rp) == -1)
- warnx("failed to add rule %d", rp->nr);
+ warnx("failed to %s rule %d",
+ action == ACTION_DELETE ? "delete" : "add",
+ rp->nr);
} else {
if (pfkey_ipsec_establish(action, rp) == -1)
- warnx("failed to add rule %d", rp->nr);
+ warnx("failed to %s rule %d",
+ action == ACTION_DELETE ? "delete" : "add",
+ rp->nr);
}
/* src and dst are always used. */