aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2003-01-30 05:45:45 +0000
committerSam Leffler <sam@FreeBSD.org>2003-01-30 05:45:45 +0000
commit9359ad861e8496cadce8d171c234e8f5d0aa8e8f (patch)
tree2f3502a78067824a358253027767523b534ac117 /sys
parent28a34902c4633566fcf84a8847bdadfc3a9d558b (diff)
FAST_IPSEC bandaid: act like KAME and ignore ENOENT error codes from
ipsec4_process_packet; they happen when a packet is dropped because an SA acquire is initiated Submitted by: Doug Ambrisko <ambrisko@verniernetworks.com>
Notes
svn path=/head/; revision=110074
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_output.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 8a85124c2e9f..f61f61da6728 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -669,6 +669,15 @@ skip_ipsec:
/* NB: callee frees mbuf */
error = ipsec4_process_packet(m, sp->req, flags, 0);
+ /*
+ * Preserve KAME behaviour: ENOENT can be returned
+ * when an SA acquire is in progress. Don't propagate
+ * this to user-level; it confuses applications.
+ *
+ * XXX this will go away when the SADB is redone.
+ */
+ if (error == ENOENT)
+ error = 0;
splx(s);
goto done;
} else {