From 9fba6021a9be84d7d08d4defbd9700d2543d9135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Tue, 2 Apr 2019 19:36:03 +0200 Subject: [PATCH] sch_cake: Use tc_skb_protocol for getting packet protocol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Toke Høiland-Jørgensen --- sch_cake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sch_cake.c b/sch_cake.c index a5d51f9..016d5d1 100644 --- a/sch_cake.c +++ b/sch_cake.c @@ -1644,7 +1644,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)