mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
sch_cake: Use tc_skb_protocol() helper for getting packet protocol
[ Upstream commit b2100cc56f ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5f72cb2ab5
commit
490532225e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user