From: Wolfgang Bumiller Date: Thu, 18 Jan 2018 10:32:36 +0000 (+0100) Subject: net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d3303a65a00c94372ddab831570647488e6c06e2;p=openwrt%2Fstaging%2Fblogic.git net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr 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 Signed-off-by: David S. Miller --- diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 8e08b6da72f3..753ac9361154 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -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: