netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 07/12] net: sched: Simplify em_ipset_match
Date: Fri, 19 Jun 2015 19:17:44 +0200	[thread overview]
Message-ID: <1434734269-4545-8-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1434734269-4545-1-git-send-email-pablo@netfilter.org>

From: "Eric W. Biederman" <ebiederm@xmission.com>

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 |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/em_ipset.c b/net/sched/em_ipset.c
index a3d79c8..df0328b 100644
--- a/net/sched/em_ipset.c
+++ b/net/sched/em_ipset.c
@@ -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;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in

  parent reply	other threads:[~2015-06-19 17:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19 17:17 [PATCH 00/12] Netfilter updates for net-next Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 01/12] netfilter: nfnetlink_queue: add security context information Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 02/12] netfilter: xt_socket: add XT_SOCKET_RESTORESKMARK flag Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 03/12] netfilter: x_tables: align per cpu xt_counter Pablo Neira Ayuso
2015-06-22 11:49   ` David Laight
2015-06-22 13:27     ` Eric Dumazet
2015-06-19 17:17 ` [PATCH 04/12] netfilter: bridge: rename br_netfilter.c to br_netfilter_hooks.c Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 05/12] netfilter: bridge: split ipv6 code into separated file Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 06/12] netfilter: Kill unused copies of RCV_SKB_FAIL Pablo Neira Ayuso
2015-06-19 17:17 ` Pablo Neira Ayuso [this message]
2015-06-19 17:17 ` [PATCH 08/12] net: include missing headers in net/net_namespace.h Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 09/12] netfilter: use forward declaration instead of including linux/proc_fs.h Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 10/12] netfilter: don't pull include/linux/netfilter.h from netns headers Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 11/12] netfilter: Remove spurios included of netfilter.h Pablo Neira Ayuso
2015-06-19 17:17 ` [PATCH 12/12] netfilter: xtables: fix warnings on 32bit platforms Pablo Neira Ayuso
2015-06-20 22:40 ` [PATCH 00/12] Netfilter updates for net-next David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434734269-4545-8-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).