diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-03 21:46:06 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-03 21:46:06 +0000 |
commit | 3e414096429d55fbc8116171bba3487647bbe638 (patch) | |
tree | 2b5fcfd9d16fa3a32c829fc2076f6e3785b43374 /net/sunrpc/svcsock.c | |
parent | 20b23bfcf36fcb2d16d8b844501072541970637c (diff) |
Merge with Linux 2.4.0-test3-pre2.
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index e0a13d725..f0f714ff0 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -32,6 +32,7 @@ #include <linux/netdevice.h> #include <linux/skbuff.h> #include <net/sock.h> +#include <net/checksum.h> #include <net/ip.h> #include <asm/uaccess.h> @@ -371,6 +372,16 @@ svc_udp_recvfrom(struct svc_rqst *rqstp) dprintk("svc: recvfrom returned error %d\n", -err); } + if (skb->ip_summed != CHECKSUM_UNNECESSARY) { + unsigned int csum = skb->csum; + csum = csum_partial(skb->h.raw, skb->len, csum); + if ((unsigned short)csum_fold(csum)) { + skb_free_datagram(svsk->sk_sk, skb); + svc_sock_received(svsk, 0); + return 0; + } + } + /* There may be more data */ svsk->sk_data = 1; |