Skip to content

Commit

Permalink
net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr
Browse files Browse the repository at this point in the history
TCF_LAYER_LINK and TCF_LAYER_NETWORK returned the same pointer as
skb->data points to the network header.
Use skb_mac_header instead.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wolfgang Bumiller authored and David S. Miller committed Jan 24, 2018
1 parent 560a660 commit d3303a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/pkt_cls.h
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer)
{
switch (layer) {
case TCF_LAYER_LINK:
return skb->data;
return skb_mac_header(skb);
case TCF_LAYER_NETWORK:
return skb_network_header(skb);
case TCF_LAYER_TRANSPORT:
Expand Down

0 comments on commit d3303a6

Please sign in to comment.