Merge tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux
[cascardo/linux.git] / net / netfilter / xt_addrtype.c
index 5b4743c..11d6091 100644 (file)
@@ -125,7 +125,7 @@ static inline bool match_type(struct net *net, const struct net_device *dev,
 static bool
 addrtype_mt_v0(const struct sk_buff *skb, struct xt_action_param *par)
 {
-       struct net *net = dev_net(par->in ? par->in : par->out);
+       struct net *net = par->net;
        const struct xt_addrtype_info *info = par->matchinfo;
        const struct iphdr *iph = ip_hdr(skb);
        bool ret = true;
@@ -143,7 +143,7 @@ addrtype_mt_v0(const struct sk_buff *skb, struct xt_action_param *par)
 static bool
 addrtype_mt_v1(const struct sk_buff *skb, struct xt_action_param *par)
 {
-       struct net *net = dev_net(par->in ? par->in : par->out);
+       struct net *net = par->net;
        const struct xt_addrtype_info_v1 *info = par->matchinfo;
        const struct iphdr *iph;
        const struct net_device *dev = NULL;