[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081217.194942.01082060.davem@davemloft.net>
Date: Wed, 17 Dec 2008 19:49:42 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: herbert@...dor.apana.org.au
Cc: martin@...ongswan.org, netdev@...r.kernel.org
Subject: Re: [PATCH] xfrm: Accept ESP packets regardless of UDP
encapsulation mode
From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Thu, 18 Dec 2008 14:47:26 +1100
> Martin Willi <martin@...ongswan.org> wrote:
> > An IPsec node speaking IKEv2 MUST accept incoming UDP encapsulated
> > ESP packets, even if no NAT situation is detected. This is important
> > if MOBIKE is in use. Some implementation keep the encapsulation
> > mode if they move out of a NAT situation.
> >
> > diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
> > index b4a1317..65bcf09 100644
> > --- a/net/xfrm/xfrm_input.c
> > +++ b/net/xfrm/xfrm_input.c
> > @@ -167,11 +167,6 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
> > goto drop_unlock;
> > }
> >
> > - if ((x->encap ? x->encap->encap_type : 0) != encap_type) {
> > - XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATEMISMATCH);
> > - goto drop_unlock;
> > - }
>
> This can't work as ESP relies on this check. Now that it's gone
> ESP may touch a UDP header which doesn't exist.
>
> What exactly are you trying to achieve?
IKEv2 daemon needs to be agnostic about this situation. So we have to
accept everything, regardless of configured encapsulation type.
At least that is my impression after reading the MOBIKE documents.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists