net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 18 Jan 2018 10:32:36 +0000 (11:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jan 2018 19:52:48 +0000 (14:52 -0500)
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>
include/net/pkt_cls.h

index 8e08b6da72f325bd4a623191e886fb1b746644d7..753ac9361154be4ff9d05f5aa22473f8fb818ea0 100644 (file)
@@ -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: