]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/sch_cake-use-tc_skb_protocol-helper-for-getting-packet-protocol.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / queue-5.0 / sch_cake-use-tc_skb_protocol-helper-for-getting-packet-protocol.patch
1 From foo@baz Sat Apr 20 16:43:09 CEST 2019
2 From: "Toke Høiland-Jørgensen" <toke@redhat.com>
3 Date: Thu, 4 Apr 2019 15:01:33 +0200
4 Subject: sch_cake: Use tc_skb_protocol() helper for getting packet protocol
5
6 From: "Toke Høiland-Jørgensen" <toke@redhat.com>
7
8 [ Upstream commit b2100cc56fca8c51d28aa42a9f1fbcb2cf351996 ]
9
10 We shouldn't be using skb->protocol directly as that will miss cases with
11 hardware-accelerated VLAN tags. Use the helper instead to get the right
12 protocol number.
13
14 Reported-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
15 Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 ---
18 net/sched/sch_cake.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 --- a/net/sched/sch_cake.c
22 +++ b/net/sched/sch_cake.c
23 @@ -1526,7 +1526,7 @@ static u8 cake_handle_diffserv(struct sk
24 {
25 u8 dscp;
26
27 - switch (skb->protocol) {
28 + switch (tc_skb_protocol(skb)) {
29 case htons(ETH_P_IP):
30 dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2;
31 if (wash && dscp)