From 3e414096429d55fbc8116171bba3487647bbe638 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 3 Jul 2000 21:46:06 +0000 Subject: Merge with Linux 2.4.0-test3-pre2. --- net/sunrpc/svcsock.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'net/sunrpc/svcsock.c') 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 #include #include +#include #include #include @@ -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; -- cgit v1.2.3