From: Thomas Graf Date: Thu, 25 Jul 2013 12:08:04 +0000 (+0200) Subject: pktgen: Use ip_send_check() to compute checksum X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=03c633e73353d3c116cab6164933d69ee2180470;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git pktgen: Use ip_send_check() to compute checksum Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 48cebf2c3e7a..2dec6f1b0cd7 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2758,8 +2758,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, iph->frag_off = 0; iplen = 20 + 8 + datalen; iph->tot_len = htons(iplen); - iph->check = 0; - iph->check = ip_fast_csum((void *)iph, iph->ihl); + ip_send_check(iph); skb->protocol = protocol; skb->dev = odev; skb->pkt_type = PACKET_HOST;