Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6858177 authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 92101b3b
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -3173,8 +3173,6 @@ static int __netif_receive_skb(struct sk_buff *skb)
	if (netpoll_receive_skb(skb))
	if (netpoll_receive_skb(skb))
		return NET_RX_DROP;
		return NET_RX_DROP;


	if (!skb->skb_iif)
		skb->skb_iif = skb->dev->ifindex;
	orig_dev = skb->dev;
	orig_dev = skb->dev;


	skb_reset_network_header(skb);
	skb_reset_network_header(skb);
@@ -3186,6 +3184,7 @@ static int __netif_receive_skb(struct sk_buff *skb)
	rcu_read_lock();
	rcu_read_lock();


another_round:
another_round:
	skb->skb_iif = skb->dev->ifindex;


	__this_cpu_inc(softnet_data.processed);
	__this_cpu_inc(softnet_data.processed);