netdev
[Top] [All Lists]

[IPSEC] Remove run-time encap_type checks in esp4

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: [IPSEC] Remove run-time encap_type checks in esp4
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 26 Jun 2004 11:57:15 +1000
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040625103928.3b1b3275.davem@xxxxxxxxxx>
References: <20040625121147.GA11231@xxxxxxxxxxxxxxxxxxx> <20040625123527.GA11685@xxxxxxxxxxxxxxxxxxx> <20040625103928.3b1b3275.davem@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.5.1+cvs20040105i
On Fri, Jun 25, 2004 at 10:39:28AM -0700, David S. Miller wrote:
> On Fri, 25 Jun 2004 22:35:27 +1000
> Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > Here is the patch to check encap_type at the earliest possible
> > opportunity in xfrm_user/af_key.
> 
> Applied.

Thanks.

This allows us to remove all the per-packet checks on x->encap->encap_type.
I've left the check in esp_input just in case someone adds a non-ESP encap
type in future.

However, printing a warning and then continuing is definitely wrong.
So expect a follow-up patch to drop the packet when encap_type is
unknown in esp_input.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email:  Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: p
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>