From: Martin Willi <martin@strongswan.org>
To: David Miller <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, netdev@vger.kernel.org, sbergman@cc.hut.fi
Subject: Re: [PATCH] xfrm: Accept ESP packets regardless of UDP encapsulation mode
Date: Fri, 19 Dec 2008 11:00:45 +0100 [thread overview]
Message-ID: <1229680846.13159.115.camel@martin> (raw)
In-Reply-To: <20081218.192313.250049404.davem@davemloft.net>
> I'm going to revert the change from net-next-2.6 from now
Yes, I'm fine with that.
> 3) Martin can apply the change locally to do testing until we
> work this stuff out.
I'll do some testing with a modified patch that accepts encapsulated
packets on a non-encapsulating SA, but not vice-versa. This should solve
that specific issue without introducing that (and hopefully no other)
regression.
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 7527940..ffc32f5 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -166,7 +166,7 @@ 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) {
+ if (x->encap && x->encap->encap_type != encap_type) {
XFRM_INC_STATS(LINUX_MIB_XFRMINSTATEMISMATCH);
goto drop_unlock;
}
--
1.5.6.3
next prev parent reply other threads:[~2008-12-19 10:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2008-12-19 10:19 ` Herbert Xu
2008-12-18 22:38 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1229680846.13159.115.camel@martin \
--to=martin@strongswan.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=sbergman@cc.hut.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox