From 68649ae3d37aad1878d5b44131fd6e3a79a72948 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 30 Jan 2003 05:45:45 +0000 Subject: 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 --- sys/netinet/ip_output.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sys/netinet/ip_output.c') diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 8a85124..f61f61d 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 { -- cgit v1.1