summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen2019-04-04 15:01:33 +0200
committerGreg Kroah-Hartman2019-04-27 09:36:32 +0200
commit490532225e20f2c3ef763c7da2c4e090ac42318a (patch)
tree64dee82a1d17389e1dbe824542309172517f15eb /net/sched
parentroute: Avoid crash from dereferencing NULL rt->from (diff)
downloadkernel-qcow2-linux-490532225e20f2c3ef763c7da2c4e090ac42318a.tar.gz
kernel-qcow2-linux-490532225e20f2c3ef763c7da2c4e090ac42318a.tar.xz
kernel-qcow2-linux-490532225e20f2c3ef763c7da2c4e090ac42318a.zip
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/sched')
-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)