diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-23 19:27:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-23 19:36:27 -0400 |
commit | b68581778cd0051a3fb9a2b614dee7eccb5127ff (patch) | |
tree | fadc77a8c3f1b0a77e05a69fad951f83ead67d43 /net | |
parent | 92101b3b2e3178087127709a556b091dae314e9e (diff) |
net: Make skb->skb_iif always track skb->dev
Make it follow device decapsulation, from things such as VLAN and
bonding.
The stuff that actually cares about pre-demuxed device pointers, is
handled by the "orig_dev" variable in __netif_receive_skb(). And
the only consumer of that is the po->origdev feature of AF_PACKET
sockets.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index cca02ae7a844..0ebaea16632f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3173,8 +3173,6 @@ static int __netif_receive_skb(struct sk_buff *skb) | |||
3173 | if (netpoll_receive_skb(skb)) | 3173 | if (netpoll_receive_skb(skb)) |
3174 | return NET_RX_DROP; | 3174 | return NET_RX_DROP; |
3175 | 3175 | ||
3176 | if (!skb->skb_iif) | ||
3177 | skb->skb_iif = skb->dev->ifindex; | ||
3178 | orig_dev = skb->dev; | 3176 | orig_dev = skb->dev; |
3179 | 3177 | ||
3180 | skb_reset_network_header(skb); | 3178 | skb_reset_network_header(skb); |
@@ -3186,6 +3184,7 @@ static int __netif_receive_skb(struct sk_buff *skb) | |||
3186 | rcu_read_lock(); | 3184 | rcu_read_lock(); |
3187 | 3185 | ||
3188 | another_round: | 3186 | another_round: |
3187 | skb->skb_iif = skb->dev->ifindex; | ||
3189 | 3188 | ||
3190 | __this_cpu_inc(softnet_data.processed); | 3189 | __this_cpu_inc(softnet_data.processed); |
3191 | 3190 | ||