aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-11-08 07:34:11 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-08 07:34:11 -0800
commit3ee783a3e4867ce5691bfa6a818959e88a50f209 (patch)
tree4263289a5f8551500c0c66bbb0c7ab01a4e8e075 /net/core/netpoll.c
parentLinux 2.6.19-rc5 (diff)
parent[DECNET]: Endianess fixes (try #2) (diff)
downloadwireguard-linux-3ee783a3e4867ce5691bfa6a818959e88a50f209.tar.xz
wireguard-linux-3ee783a3e4867ce5691bfa6a818959e88a50f209.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [DECNET]: Endianess fixes (try #2) [TG3]: Fix array overrun in tg3_read_partno(). [NET]: Set truesize in pskb_copy [NETPOLL]: Compute checksum properly in netpoll_send_udp(). [PKT_SCHED] sch_htb: Use hlist_del_init(). [TCP]: Don't use highmem in tcp hash size calculation. [NET]: kconfig, correct traffic shaper
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 9308af060b44..6589adb14cbf 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -340,6 +340,12 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
udph->dest = htons(np->remote_port);
udph->len = htons(udp_len);
udph->check = 0;
+ udph->check = csum_tcpudp_magic(htonl(np->local_ip),
+ htonl(np->remote_ip),
+ udp_len, IPPROTO_UDP,
+ csum_partial((unsigned char *)udph, udp_len, 0));
+ if (udph->check == 0)
+ udph->check = -1;
skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph));