summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2008-12-22 17:00:38 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2008-12-22 17:00:38 +0000
commitc5a60b4b65a5c711ad9a53052f5bf8a4bfbbc380 (patch)
tree5697f9c43a77120f7ef1beb605232da966e426fe
parent0579bc648c3e5d07b3b026465841ef777ea208b8 (diff)
Only warn about pfkey failures when errno is != EEXIST.
This avoids warnings about already existing manual flows when ipsec.conf is reloaded. From Mitja Muzenic <mitja at muzenic dot net>, thanks!
-rw-r--r--sbin/ipsecctl/pfkey.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/ipsecctl/pfkey.c b/sbin/ipsecctl/pfkey.c
index bf5f6fd75bd..c1c88e3bf52 100644
--- a/sbin/ipsecctl/pfkey.c
+++ b/sbin/ipsecctl/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.48 2007/03/16 20:51:01 markus Exp $ */
+/* $OpenBSD: pfkey.c,v 1.49 2008/12/22 17:00:37 hshoexer Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
* Copyright (c) 2003, 2004 Markus Friedl <markus@openbsd.org>
@@ -780,8 +780,10 @@ pfkey_reply(int sd, u_int8_t **datap, ssize_t *lenp)
}
if (datap == NULL && hdr.sadb_msg_errno != 0) {
errno = hdr.sadb_msg_errno;
- warn("PF_KEY failed");
- return -1;
+ if (errno != EEXIST) {
+ warn("PF_KEY failed");
+ return -1;
+ }
}
return 0;
}