Skip to content

Commit b2100cc

Browse files
tohojodavem330
authored andcommitted
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>
1 parent aecfde2 commit b2100cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sched/sch_cake.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ static u8 cake_handle_diffserv(struct sk_buff *skb, u16 wash)
15191519
{
15201520
u8 dscp;
15211521

1522-
switch (skb->protocol) {
1522+
switch (tc_skb_protocol(skb)) {
15231523
case htons(ETH_P_IP):
15241524
dscp = ipv4_get_dsfield(ip_hdr(skb)) >> 2;
15251525
if (wash && dscp)

0 commit comments

Comments
 (0)