]> git.baikalelectronics.ru Git - kernel.git/commit
net: clear skb->priority when forwarding to another netns
authorWANG Cong <xiyou.wangcong@gmail.com>
Fri, 20 Mar 2015 21:29:09 +0000 (14:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Mar 2015 20:43:08 +0000 (16:43 -0400)
commitf65d70c9f3f35f44f6eec0bd5b25c11f6129d7a2
tree40ad1838d01ea13b9d8438a7a7222179b755a751
parent080fd4c6cd8aa8722c1d07ed0f7e4197540916e2
net: clear skb->priority when forwarding to another netns

skb->priority can be set for two purposes:

1) With respect to IP TOS field, which is computed by a mask.
Ususally used for priority qdisc's (pfifo, prio etc.), on TX
side (we only have ingress qdisc on RX side).

2) Used as a classid or flowid, works in the same way with tc
classid. What's more, this can even override the classid
of tc filters.

For case 1), it has been respected within its netns, I don't
see any point of keeping it for another netns, especially
when packets will be forwarded to Rx path (no matter from TX
path or RX path).

For case 2) we care, our applications run inside a netns,
and we classify the packets by our own filters outside,
If some application sets this priority, it could bypass
our filters, therefore clear it when moving out of a netns,
it makes no sense to bypass tc filters out of its netns.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c