]> git.proxmox.com Git - pve-kernel.git/blob - patches/kernel/0011-net-sched-fix-TCF_LAYER_LINK-case-in-tcf_get_base_pt.patch
416c277187b16048fd6a193ad25ef05b6335a321
[pve-kernel.git] / patches / kernel / 0011-net-sched-fix-TCF_LAYER_LINK-case-in-tcf_get_base_pt.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Fri, 19 Jan 2018 11:12:38 +0100
4 Subject: [PATCH] net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 TCF_LAYER_LINK and TCF_LAYER_NETWORK returned the same pointer as
10 skb->data points to the network header.
11 Use skb_mac_header instead.
12
13 Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
15 ---
16 include/net/pkt_cls.h | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
20 index 537d0a0ad4c4..4450961b1554 100644
21 --- a/include/net/pkt_cls.h
22 +++ b/include/net/pkt_cls.h
23 @@ -395,7 +395,7 @@ static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer)
24 {
25 switch (layer) {
26 case TCF_LAYER_LINK:
27 - return skb->data;
28 + return skb_mac_header(skb);
29 case TCF_LAYER_NETWORK:
30 return skb_network_header(skb);
31 case TCF_LAYER_TRANSPORT:
32 --
33 2.14.2
34