]> granicus.if.org Git - ipset/commitdiff
net: sched: Simplify em_ipset_match
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 25 Jun 2015 09:48:23 +0000 (11:48 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 25 Jun 2015 09:48:23 +0000 (11:48 +0200)
em->net is always set and always available, use it in preference
to dev_net(skb->dev).

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/sched/em_ipset.c

index 53185d55fe863143fc98b02d7e8a01d66e68fda2..31a0bd84ca82a0801ff71fb5d7cca371fdff4a51 100644 (file)
@@ -112,8 +112,8 @@ static int em_ipset_match(struct sk_buff *skb, struct tcf_ematch *em,
 
        rcu_read_lock();
 
-       if (dev && skb->skb_iif)
-               indev = dev_get_by_index_rcu(dev_net(dev), skb->skb_iif);
+       if (skb->skb_iif)
+               indev = dev_get_by_index_rcu(em->net, skb->skb_iif);
 
        acpar.in      = indev ? indev : dev;
        acpar.out     = dev;