| 12345678910111213141516171819202122232425262728293031323334 |
- From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
- From: Wolfgang Bumiller <[email protected]>
- Date: Fri, 19 Jan 2018 11:12:38 +0100
- Subject: [PATCH] net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- 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 <[email protected]>
- Signed-off-by: Fabian Grünbichler <[email protected]>
- ---
- include/net/pkt_cls.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
- index 537d0a0ad4c4..4450961b1554 100644
- --- a/include/net/pkt_cls.h
- +++ b/include/net/pkt_cls.h
- @@ -395,7 +395,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:
- --
- 2.14.2
|