summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@netfilter.org>2022-11-07 21:50:05 +0100
committerJozsef Kadlecsik <kadlec@netfilter.org>2022-11-07 21:50:05 +0100
commit6aa65d00f6a7305310eec05218b9ab9dea396658 (patch)
treeaa29ef1b8c07806a7d3edf0a088835accd52f4a7 /kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
parentb0a56bb18f10e5be0c2bf668ce50c0203c2b2bdb (diff)
compatibility: move to skb_protocol in the code from tc_skb_protocol
And fix a typo committed by me in em_sched.c too.
Diffstat (limited to 'kernel/include/linux/netfilter/ipset/ip_set_compat.h.in')
-rw-r--r--kernel/include/linux/netfilter/ipset/ip_set_compat.h.in8
1 files changed, 3 insertions, 5 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 4d2c446..6a4b071 100644
--- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
+++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
@@ -406,11 +406,9 @@ static inline int nla_put_in6_addr(struct sk_buff *skb, int attrtype,
#define skb_vlan_tag_present vlan_tx_tag_present
#endif
-static inline __be16 tc_skb_protocol(const struct sk_buff *skb)
+#ifndef HAVE_SKB_PROTOCOL
+static inline __be16 skb_protocol(const struct sk_buff *skb, bool skip_vlan)
{
-#ifdef HAVE_SKB_PROTOCOL
- return skb_protocol(skb, true);
-#else
if (skb_vlan_tag_present(skb))
#ifdef HAVE_VLAN_PROTO_IN_SK_BUFF
return skb->vlan_proto;
@@ -418,9 +416,9 @@ static inline __be16 tc_skb_protocol(const struct sk_buff *skb)
return htons(ETH_P_8021Q);
#endif
return skb->protocol;
-#endif
}
#endif
+#endif
#ifdef HAVE_XT_NET
#define IPSET_DEV_NET(par) xt_net(par)