From: Michał Mirosław Date: Tue, 14 Dec 2010 12:35:13 +0000 (+0000) Subject: net/veth: Fix packet checksumming X-Git-Tag: MMI-PSA29.97-13-9~21500^2~21 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0b7967503dc97864f283a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: David S. Miller --- 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) if (!(rcv->flags & IFF_UP)) goto tx_drop; - if (dev->features & NETIF_F_NO_CSUM) + /* don't change ip_summed == CHECKSUM_PARTIAL, as that + will cause bad checksum on forwarded packets */ + if (skb->ip_summed == CHECKSUM_NONE) skb->ip_summed = rcv_priv->ip_summed; length = skb->len + ETH_HLEN;