summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-11-30 12:42:06 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-11-30 12:42:06 +0000
commit9a093e2daa2f65560a8d842c66e35d2bd15909a9 (patch)
treec41a8b5f7103f3cc2135198f22275f97b10c4d1e /sbin
parent68ce4432a934116ff8430fa5845ea7353f86a89f (diff)
handle that pfkey_ipsec_flush() can fail.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipsecctl/ipsecctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/ipsecctl/ipsecctl.c b/sbin/ipsecctl/ipsecctl.c
index c0a5cd1dc23..36a5193d87b 100644
--- a/sbin/ipsecctl/ipsecctl.c
+++ b/sbin/ipsecctl/ipsecctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsecctl.c,v 1.35 2005/11/21 09:52:22 hshoexer Exp $ */
+/* $OpenBSD: ipsecctl.c,v 1.36 2005/11/30 12:42:05 hshoexer Exp $ */
/*
* Copyright (c) 2004, 2005 Hans-Joerg Hoexer <hshoexer@openbsd.org>
*
@@ -320,7 +320,8 @@ ipsecctl_flush(int opts)
if (pfkey_init() == -1)
errx(1, "ipsecctl_flush: failed to open PF_KEY socket");
- pfkey_ipsec_flush();
+ if (pfkey_ipsec_flush() == -1)
+ errx(1, "ipsecctl_flush: failed to flush");
return (0);
}