netfilter: propagate net to nf_bridge_get_physindev
[platform/kernel/linux-starfive.git] / net / netfilter / ipset / ip_set_hash_netiface.c
index 95aeb31..30a655e 100644 (file)
@@ -138,9 +138,9 @@ hash_netiface4_data_next(struct hash_netiface4_elem *next,
 #include "ip_set_hash_gen.h"
 
 #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
-static const char *get_physindev_name(const struct sk_buff *skb)
+static const char *get_physindev_name(const struct sk_buff *skb, struct net *net)
 {
-       struct net_device *dev = nf_bridge_get_physindev(skb);
+       struct net_device *dev = nf_bridge_get_physindev(skb, net);
 
        return dev ? dev->name : NULL;
 }
@@ -177,7 +177,7 @@ hash_netiface4_kadt(struct ip_set *set, const struct sk_buff *skb,
 
        if (opt->cmdflags & IPSET_FLAG_PHYSDEV) {
 #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
-               const char *eiface = SRCDIR ? get_physindev_name(skb) :
+               const char *eiface = SRCDIR ? get_physindev_name(skb, xt_net(par)) :
                                              get_physoutdev_name(skb);
 
                if (!eiface)
@@ -395,7 +395,7 @@ hash_netiface6_kadt(struct ip_set *set, const struct sk_buff *skb,
 
        if (opt->cmdflags & IPSET_FLAG_PHYSDEV) {
 #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
-               const char *eiface = SRCDIR ? get_physindev_name(skb) :
+               const char *eiface = SRCDIR ? get_physindev_name(skb, xt_net(par)) :
                                              get_physoutdev_name(skb);
 
                if (!eiface)