summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@redhat.com>2019-04-04 16:01:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-27 10:36:32 +0300
commit490532225e20f2c3ef763c7da2c4e090ac42318a (patch)
tree64dee82a1d17389e1dbe824542309172517f15eb /net
parent5f72cb2ab51d242158b6b963365d70f88844b983 (diff)
downloadlinux-490532225e20f2c3ef763c7da2c4e090ac42318a.tar.xz
sch_cake: Use tc_skb_protocol() helper for getting packet protocol
[ Upstream commit b2100cc56fca8c51d28aa42a9f1fbcb2cf351996 ] 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_cake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index 793016d722ec..c5e87d1c26eb 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -1526,7 +1526,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)