Skip to content

Commit

Permalink
net: sched: Simplify em_ipset_match
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman authored and Pablo Neira Ayuso committed Jun 18, 2015
1 parent 2fd1dc9 commit 17cebfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sched/em_ipset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 17cebfd

Please sign in to comment.