From: Daniel Phillips <phillips@xxxxxxxxxx>>>Can you please characterize the conditions under which skb->dev changes
after the alloc? Are there writings on this subtlety?
The packet scheduler and classifier can redirect packets to different
devices, and can the netfilter layer.
The setting of skb->dev is wholly transient and you cannot rely upon
it to be the same as when you set it on allocation.
Even simple things like the bonding device change skb->dev on every
receive.
I think you need to study the networking stack a little more before
you continue to play in this delicate area :-)