net: sched: Simplify em_ipset_match
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 17 Jun 2015 15:28:17 +0000 (10:28 -0500)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 18 Jun 2015 19:14:28 +0000 (21:14 +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>
net/sched/em_ipset.c

index a3d79c8bf3b873b52163e938585bc01957bc6956..df0328ba6a48243056526fbc044f8c0e392f4f3c 100644 (file)
@@ -92,8 +92,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;