diff options
author | Toke Høiland-Jørgensen <toke@redhat.com> | 2019-04-04 15:01:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-04 10:55:59 -0700 |
commit | b2100cc56fca8c51d28aa42a9f1fbcb2cf351996 (patch) | |
tree | f31ed49cb46d49d2d89516a7164784dd71e1c0c7 /net/sched | |
parent | aecfde23108b8e637d9f5c5e523b24fb97035dc3 (diff) | |
download | linux-b2100cc56fca8c51d28aa42a9f1fbcb2cf351996.tar.gz linux-b2100cc56fca8c51d28aa42a9f1fbcb2cf351996.tar.bz2 linux-b2100cc56fca8c51d28aa42a9f1fbcb2cf351996.zip |
sch_cake: Use tc_skb_protocol() helper for getting packet protocol
We shouldn't be using skb->protocol directly as that will miss cases with
hardware-accelerated VLAN tags. Use the helper instead to get the right
protocol number.
Reported-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_cake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c index acc9b9da985f..a3b55e18df04 100644 --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c @@ -1519,7 +1519,7 @@ static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash) { u8 dscp; - switch (skb->protocol) { + switch (tc_skb_protocol(skb)) { case htons(ETH_P_IP): dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2; if (wash && dscp) |