aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-10 23:03:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-09 11:33:03 -0400
commit83bba7979059b83df4edc16f747784c6990fc3bb (patch)
treea8aa9e0fe5411b48e47a2ab1e47807abe3777582 /net/core
parenta2abc1310ff689486730215fcea629b74b01abe4 (diff)
Revert "net: maintain namespace isolation between vlan and real device"
[ Upstream commit 59b9997baba5242997ddc7bd96b1391f5275a5a4 ] This reverts commit 8a83a00b0735190384a348156837918271034144. It causes regressions for S390 devices, because it does an unconditional DST drop on SKBs for vlans and the QETH device needs the neighbour entry hung off the DST for certain things on transmit. Arnd can't remember exactly why he even needed this change. Conflicts: drivers/net/macvlan.c net/8021q/vlan_dev.c net/core/dev.c Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c36
1 files changed, 5 insertions, 31 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 1e778977486..a71eafc392e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1533,10 +1533,14 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
1533 kfree_skb(skb); 1533 kfree_skb(skb);
1534 return NET_RX_DROP; 1534 return NET_RX_DROP;
1535 } 1535 }
1536 skb_set_dev(skb, dev); 1536 skb->dev = dev;
1537 skb_dst_drop(skb);
1537 skb->tstamp.tv64 = 0; 1538 skb->tstamp.tv64 = 0;
1538 skb->pkt_type = PACKET_HOST; 1539 skb->pkt_type = PACKET_HOST;
1539 skb->protocol = eth_type_trans(skb, dev); 1540 skb->protocol = eth_type_trans(skb, dev);
1541 skb->mark = 0;
1542 secpath_reset(skb);
1543 nf_reset(skb);
1540 return netif_rx(skb); 1544 return netif_rx(skb);
1541} 1545}
1542EXPORT_SYMBOL_GPL(dev_forward_skb); 1546EXPORT_SYMBOL_GPL(dev_forward_skb);
@@ -1791,36 +1795,6 @@ void netif_device_attach(struct net_device *dev)
1791} 1795}
1792EXPORT_SYMBOL(netif_device_attach); 1796EXPORT_SYMBOL(netif_device_attach);
1793 1797
1794/**
1795 * skb_dev_set -- assign a new device to a buffer
1796 * @skb: buffer for the new device
1797 * @dev: network device
1798 *
1799 * If an skb is owned by a device already, we have to reset
1800 * all data private to the namespace a device belongs to
1801 * before assigning it a new device.
1802 */
1803#ifdef CONFIG_NET_NS
1804void skb_set_dev(struct sk_buff *skb, struct net_device *dev)
1805{
1806 skb_dst_drop(skb);
1807 if (skb->dev && !net_eq(dev_net(skb->dev), dev_net(dev))) {
1808 secpath_reset(skb);
1809 nf_reset(skb);
1810 skb_init_secmark(skb);
1811 skb->mark = 0;
1812 skb->priority = 0;
1813 skb->nf_trace = 0;
1814 skb->ipvs_property = 0;
1815#ifdef CONFIG_NET_SCHED
1816 skb->tc_index = 0;
1817#endif
1818 }
1819 skb->dev = dev;
1820}
1821EXPORT_SYMBOL(skb_set_dev);
1822#endif /* CONFIG_NET_NS */
1823
1824/* 1798/*
1825 * Invalidate hardware checksum when packet is to be mangled, and 1799 * Invalidate hardware checksum when packet is to be mangled, and
1826 * complete checksum manually on outgoing path. 1800 * complete checksum manually on outgoing path.