netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jpirko@redhat.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, shemminger@linux-foundation.org,
	kaber@trash.net, fubar@us.ibm.com, eric.dumazet@gmail.com,
	nicolas.2p.debian@gmail.com, andy@greyhouse.net,
	xiaosuo@gmail.com
Subject: [patch net-next-2.6 1/6] af_packet: use skb->skb_iif instead of orig_dev->ifindex
Date: Sat, 12 Mar 2011 14:14:34 +0100	[thread overview]
Message-ID: <1299935679-18135-2-git-send-email-jpirko@redhat.com> (raw)
In-Reply-To: <1299935679-18135-1-git-send-email-jpirko@redhat.com>

Since skb_iif has the desired value (ifindex of physical device actually
received the traffic) use that instead.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Changli Gao <xiaosuo@gmail.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
---
 net/packet/af_packet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index b5362e9..714383c 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -627,7 +627,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
 	sll->sll_protocol = skb->protocol;
 	sll->sll_pkttype = skb->pkt_type;
 	if (unlikely(po->origdev))
-		sll->sll_ifindex = orig_dev->ifindex;
+		sll->sll_ifindex = skb->skb_iif;
 	else
 		sll->sll_ifindex = dev->ifindex;
 
@@ -812,7 +812,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
 	sll->sll_protocol = skb->protocol;
 	sll->sll_pkttype = skb->pkt_type;
 	if (unlikely(po->origdev))
-		sll->sll_ifindex = orig_dev->ifindex;
+		sll->sll_ifindex = skb->skb_iif;
 	else
 		sll->sll_ifindex = dev->ifindex;
 
-- 
1.7.4


  reply	other threads:[~2011-03-12 13:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 13:14 [patch net-next-2.6 0/6] mostly bonding cleanups (partial repost) Jiri Pirko
2011-03-12 13:14 ` Jiri Pirko [this message]
2011-03-13 23:52   ` [patch net-next-2.6 1/6] af_packet: use skb->skb_iif instead of orig_dev->ifindex Changli Gao
2011-03-14  6:54     ` Jiri Pirko
2011-03-14  6:59       ` Changli Gao
2011-03-14  7:43         ` Jiri Pirko
2011-03-14 15:10           ` Changli Gao
2011-03-12 13:14 ` [patch net-next-2.6 2/6] bonding: register slave pointer for rx_handler Jiri Pirko
2011-03-16 19:52   ` David Miller
2011-03-12 13:14 ` [patch net-next-2.6 3/6] net: get rid of multiple bond-related netdevice->priv_flags Jiri Pirko
2011-03-16 18:45   ` [patch net-next-2.6 3/6 v2] " Jiri Pirko
2011-03-16 19:52     ` David Miller
2011-03-12 13:14 ` [patch net-next-2.6 4/6] bonding: wrap slave state work Jiri Pirko
2011-03-16 19:52   ` David Miller
2011-03-12 13:14 ` [patch net-next-2.6 5/6] bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag Jiri Pirko
2011-03-14  5:29   ` WANG Cong
2011-03-16 18:46   ` [patch net-next-2.6 5/6 v2] " Jiri Pirko
2011-03-16 19:52     ` David Miller
2011-03-12 13:14 ` [patch net-next-2.6 6/6] net: introduce rx_handler results and logic around that Jiri Pirko
2011-03-12 13:24   ` Nicolas de Pesloüan
2011-03-12 13:25     ` Nicolas de Pesloüan
2011-03-12 13:36       ` Jiri Pirko
2011-03-16 19:53         ` 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=1299935679-18135-2-git-send-email-jpirko@redhat.com \
    --to=jpirko@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fubar@us.ibm.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.2p.debian@gmail.com \
    --cc=shemminger@linux-foundation.org \
    --cc=xiaosuo@gmail.com \
    /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).