net: maintain namespace isolation between vlan and real device

In the vlan and macvlan drivers, the start_xmit function forwards
data to the dev_queue_xmit function for another device, which may
potentially belong to a different namespace.

To make sure that classification stays within a single namespace,
this resets the potentially critical fields.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Arnd Bergmann
2010-01-30 12:23:03 +00:00
committed by David S. Miller
parent 6884b348ed
commit 8a83a00b07
4 changed files with 42 additions and 6 deletions

View File

@ -269,7 +269,7 @@ static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)
}
xmit_world:
skb->dev = vlan->lowerdev;
skb_set_dev(skb, vlan->lowerdev);
return dev_queue_xmit(skb);
}