summaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-12-04 15:40:17 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-04 15:40:17 -0800
commite061b165c7f4ec5e2e160d990b49011b5b6e5c6a (patch)
tree7108f6490557641531405d6e0d2ea7d22e58547f /net/xfrm
parent3f9b766ca7c4654d41f4f21357031c1c1e7de29e (diff)
downloadlinux-e061b165c7f4ec5e2e160d990b49011b5b6e5c6a.tar.gz
linux-e061b165c7f4ec5e2e160d990b49011b5b6e5c6a.tar.bz2
linux-e061b165c7f4ec5e2e160d990b49011b5b6e5c6a.zip
xfrm: Accept ESP packets regardless of UDP encapsulation mode
From: Martin Willi <martin@strongswan.org> 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. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_input.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index b4a13178fb40..65bcf09251ef 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;
- }
-
if (x->props.replay_window && xfrm_replay_check(x, skb, seq)) {
XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
goto drop_unlock;