patch-2.4.17 linux/net/sunrpc/xprt.c
Next file: linux/net/unix/af_unix.c
Previous file: linux/net/socket.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Fri Dec 21 16:40:33 2001
- Orig file:
linux-2.4.16/net/sunrpc/xprt.c
- Orig date:
Mon Oct 8 19:36:07 2001
diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/net/sunrpc/xprt.c linux/net/sunrpc/xprt.c
@@ -630,10 +630,14 @@
int to_move = cur_len;
if (to_move > copied)
to_move = copied;
- if (need_csum)
- csum = skb_copy_and_csum_bits(skb, offset, cur_ptr,
- to_move, csum);
- else
+ if (need_csum) {
+ unsigned int csum2;
+
+ csum2 = skb_copy_and_csum_bits(skb, offset,
+ cur_ptr,
+ to_move, 0);
+ csum = csum_block_add(csum, csum2, offset);
+ } else
skb_copy_bits(skb, offset, cur_ptr, to_move);
offset += to_move;
copied -= to_move;
@@ -647,8 +651,12 @@
}
}
if (need_csum) {
- if (slack > 0)
- csum = skb_checksum(skb, offset, slack, csum);
+ if (slack > 0) {
+ unsigned int csum2;
+
+ csum2 = skb_checksum(skb, offset, slack, 0);
+ csum = csum_block_add(csum, csum2, offset);
+ }
if ((unsigned short)csum_fold(csum))
return -1;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)