summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Bumiller <w.bumiller@proxmox.com>2018-01-18 13:32:36 +0300
committerDavid S. Miller <davem@davemloft.net>2018-01-24 22:52:48 +0300
commitd3303a65a00c94372ddab831570647488e6c06e2 (patch)
tree30cdf71a81dd251bb3bf34bff60e61a476b9c833
parent560a66075d694e6ec24c60967b4d93d97cbb33d1 (diff)
downloadlinux-d3303a65a00c94372ddab831570647488e6c06e2.tar.xz
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 <w.bumiller@proxmox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/pkt_cls.h2
1 files changed, 1 insertions, 1 deletions
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: