netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfrm: Accept ESP packets regardless of UDP encapsulation  mode
@ 2008-12-04 13:18 Martin Willi
  2008-12-04 23:40 ` David Miller
  2008-12-18  3:47 ` Herbert Xu
  0 siblings, 2 replies; 16+ messages in thread
From: Martin Willi @ 2008-12-04 13:18 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

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;
-		}
-
 		if (x->props.replay_window && xfrm_replay_check(x, skb, seq)) {
 			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
 			goto drop_unlock;
-- 
1.5.6.3




^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-12-19 10:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 13:18 [PATCH] xfrm: Accept ESP packets regardless of UDP encapsulation mode Martin Willi
2008-12-04 23:40 ` David Miller
2008-12-18  3:47 ` Herbert Xu
2008-12-18  3:49   ` David Miller
2008-12-18  3:57     ` Herbert Xu
2008-12-18  4:14       ` Herbert Xu
2008-12-18  4:17         ` David Miller
2008-12-18  4:21           ` Herbert Xu
2008-12-18 10:35         ` Martin Willi
2008-12-18 11:04           ` Herbert Xu
2008-12-18 12:36             ` Martin Willi
2008-12-18 20:54               ` Herbert Xu
2008-12-19  3:23                 ` David Miller
2008-12-19 10:00                   ` Martin Willi
2008-12-19 10:19                     ` Herbert Xu
2008-12-18 22:38             ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).