]> git.baikalelectronics.ru Git - kernel.git/commit
skbuff: Do not scrub skb mark within the same name space
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Apr 2015 01:03:27 +0000 (09:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Apr 2015 18:20:40 +0000 (14:20 -0400)
commit90d89c72fce78b05d72d365274405245097c8dc7
treecdc47056012c571b67249a68129dee21886cf6f4
parent0393b23326d38214ba235ead61ee86ff1f1b817b
skbuff: Do not scrub skb mark within the same name space

On Wed, Apr 15, 2015 at 05:41:26PM +0200, Nicolas Dichtel wrote:
> Le 15/04/2015 15:57, Herbert Xu a écrit :
> >On Wed, Apr 15, 2015 at 06:22:29PM +0800, Herbert Xu wrote:
> [snip]
> >Subject: skbuff: Do not scrub skb mark within the same name space
> >
> >The commit ae81f0e02de739ccc247e0a13ae1c2c3fc004569 ("tunnels:
> Maybe add a Fixes tag?
> Fixes: ae81f0e02de7 ("tunnels: harmonize cleanup done on skb on rx path")
>
> >harmonize cleanup done on skb on rx path") broke anyone trying to
> >use netfilter marking across IPv4 tunnels.  While most of the
> >fields that are cleared by skb_scrub_packet don't matter, the
> >netfilter mark must be preserved.
> >
> >This patch rearranges skb_scurb_packet to preserve the mark field.
> nit: s/scurb/scrub
>
> Else it's fine for me.

Sure.

PS I used the wrong email for James the first time around.  So
let me repeat the question here.  Should secmark be preserved
or cleared across tunnels within the same name space? In fact,
do our security models even support name spaces?

---8<---
The commit ae81f0e02de739ccc247e0a13ae1c2c3fc004569 ("tunnels:
harmonize cleanup done on skb on rx path") broke anyone trying to
use netfilter marking across IPv4 tunnels.  While most of the
fields that are cleared by skb_scrub_packet don't matter, the
netfilter mark must be preserved.

This patch rearranges skb_scrub_packet to preserve the mark field.

Fixes: ae81f0e02de7 ("tunnels: harmonize cleanup done on skb on rx path")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c