diff options
author | Jiri Pirko <jiri@resnulli.us> | 2015-01-13 17:13:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-13 23:51:08 +0100 |
commit | d8b9605d2697c48fb822c821c5751afbb4567003 (patch) | |
tree | e9c4cbcafae686743acae5cd834086735e31aa7a /net/sched/act_csum.c | |
parent | atm: horizon: Remove some unused functions (diff) | |
download | linux-d8b9605d2697c48fb822c821c5751afbb4567003.tar.xz linux-d8b9605d2697c48fb822c821c5751afbb4567003.zip |
net: sched: fix skb->protocol use in case of accelerated vlan path
tc code implicitly considers skb->protocol even in case of accelerated
vlan paths and expects vlan protocol type here. However, on rx path,
if the vlan header was already stripped, skb->protocol contains value
of next header. Similar situation is on tx path.
So for skbs that use skb->vlan_tci for tagging, use skb->vlan_proto instead.
Reported-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_csum.c')
-rw-r--r-- | net/sched/act_csum.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c index edbf40dac709..4cd5cf1aedf8 100644 --- a/net/sched/act_csum.c +++ b/net/sched/act_csum.c @@ -509,7 +509,7 @@ static int tcf_csum(struct sk_buff *skb, if (unlikely(action == TC_ACT_SHOT)) goto drop; - switch (skb->protocol) { + switch (tc_skb_protocol(skb)) { case cpu_to_be16(ETH_P_IP): if (!tcf_csum_ipv4(skb, update_flags)) goto drop; |