#include "ip_set_hash_gen.h"
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
+#ifdef HAVE_NF_BRIDGE_GET_PYSINDEV_NET
+static const char *get_physindev_name(const struct sk_buff *skb, struct net *net)
+{
+ struct net_device *dev = nf_bridge_get_physindev(skb, net);
+#else
static const char *get_physindev_name(const struct sk_buff *skb)
{
struct net_device *dev = nf_bridge_get_physindev(skb);
-
+#endif
return dev ? dev->name : NULL;
}
if (opt->cmdflags & IPSET_FLAG_PHYSDEV) {
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
+#ifdef HAVE_NF_BRIDGE_GET_PYSINDEV_NET
+ const char *eiface = SRCDIR ? get_physindev_name(skb, xt_net(par)) :
+ get_physoutdev_name(skb);
+#else
const char *eiface = SRCDIR ? get_physindev_name(skb) :
get_physoutdev_name(skb);
+#endif
if (!eiface)
return -EINVAL;
if (opt->cmdflags & IPSET_FLAG_PHYSDEV) {
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
+#ifdef HAVE_NF_BRIDGE_GET_PYSINDEV_NET
+ const char *eiface = SRCDIR ? get_physindev_name(skb, xt_net(par)) :
+ get_physoutdev_name(skb);
+#else
const char *eiface = SRCDIR ? get_physindev_name(skb) :
get_physoutdev_name(skb);
+#endif
if (!eiface)
return -EINVAL;