diff options
author | Serhey Popovych <serhe.popovych@gmail.com> | 2019-11-29 11:21:31 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@netfilter.org> | 2019-12-09 11:05:22 +0100 |
commit | 4eda9fd68157c444f70541bd10fde3c36e09f0f1 (patch) | |
tree | 06499fba513596f99c0827611c092830f350a2cd /kernel/include | |
parent | 66d5125848150fbf8d41f456e2921a38b7690532 (diff) |
compat: Use skb_vlan_tag_present() instead of vlan_tx_tag_present()
Since RHEL6 provides it as preprocessor define and does not provide
vlan_tx_tag_present(). Add defines in case of vlan_tx_tag_present()
isn't available to back tc_skb_protocol() to old behaviour before
commit d8b9605d2697 ("net: sched: fix skb->protocol use in case
of accelerated vlan path").
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/linux/netfilter/ipset/ip_set_compat.h.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in index 38f4179..92d815e 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in +++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in @@ -335,9 +335,20 @@ static inline int nla_put_in6_addr(struct sk_buff *skb, int attrtype, #ifndef HAVE_TC_SKB_PROTOCOL #include <linux/if_vlan.h> + +/* RHEL defines it */ +#ifndef skb_vlan_tag_present +#if !defined(vlan_tx_tag_present) && \ + !defined(NETIF_F_HW_VLAN_TX) && \ + !defined(NETIF_F_HW_VLAN_CTAG_TX) +#define vlan_tx_tag_present(skb) 0 +#endif +#define skb_vlan_tag_present vlan_tx_tag_present +#endif + static inline __be16 tc_skb_protocol(const struct sk_buff *skb) { - if (vlan_tx_tag_present(skb)) + if (skb_vlan_tag_present(skb)) #ifdef HAVE_VLAN_PROTO_IN_SK_BUFF return skb->vlan_proto; #else |