diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2010-12-14 07:35:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-16 17:41:35 -0500 |
commit | 0b7967503dc97864f283a3a06fbe23e041876138 (patch) | |
tree | 66029b76d2d8f5fc74a3e8be0637b3814a0fd34a /drivers/net | |
parent | 76d661586c8131453ba75a2e027c1f21511a893a (diff) |
net/veth: Fix packet checksumming
We can't change ip_summed from CHECKSUM_PARTIAL to CHECKSUM_NONE
or CHECKSUM_UNNECESSARY because checksum in packet's headers is
not valid and will cause invalid checksum when frame is forwarded.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/veth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 0bbc0c323135..cc83fa71c3ff 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -166,7 +166,9 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
166 | if (!(rcv->flags & IFF_UP)) | 166 | if (!(rcv->flags & IFF_UP)) |
167 | goto tx_drop; | 167 | goto tx_drop; |
168 | 168 | ||
169 | if (dev->features & NETIF_F_NO_CSUM) | 169 | /* don't change ip_summed == CHECKSUM_PARTIAL, as that |
170 | will cause bad checksum on forwarded packets */ | ||
171 | if (skb->ip_summed == CHECKSUM_NONE) | ||
170 | skb->ip_summed = rcv_priv->ip_summed; | 172 | skb->ip_summed = rcv_priv->ip_summed; |
171 | 173 | ||
172 | length = skb->len + ETH_HLEN; | 174 | length = skb->len + ETH_HLEN; |