[NETPOLL]: Compute checksum properly in netpoll_send_udp().

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Chris Lalancette and committed by David S. Miller 8e365eec da33e3eb

+6
+6
net/core/netpoll.c
··· 340 udph->dest = htons(np->remote_port); 341 udph->len = htons(udp_len); 342 udph->check = 0; 343 344 skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph)); 345
··· 340 udph->dest = htons(np->remote_port); 341 udph->len = htons(udp_len); 342 udph->check = 0; 343 + udph->check = csum_tcpudp_magic(htonl(np->local_ip), 344 + htonl(np->remote_ip), 345 + udp_len, IPPROTO_UDP, 346 + csum_partial((unsigned char *)udph, udp_len, 0)); 347 + if (udph->check == 0) 348 + udph->check = -1; 349 350 skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph)); 351