From 1da8c681d5c122afe9fbadc02e92a0f9e3f7af44 Mon Sep 17 00:00:00 2001 From: Willem de Bruijn Date: Thu, 7 Apr 2016 11:44:58 -0400 Subject: sunrpc: do not pull udp headers on receive Commit e6afc8ace6dd modified the udp receive path by pulling the udp header before queuing an skbuff onto the receive queue. Sunrpc also calls skb_recv_datagram to dequeue an skb from a udp socket. Modify this receive path to also no longer expect udp headers. Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") Reported-by: Franklin S Cooper Jr. Signed-off-by: Willem de Bruijn Tested-by: Thierry Reding Signed-off-by: David S. Miller --- net/sunrpc/socklib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/sunrpc/socklib.c') diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c index de70c78025d7..f217c348b341 100644 --- a/net/sunrpc/socklib.c +++ b/net/sunrpc/socklib.c @@ -155,7 +155,7 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb) struct xdr_skb_reader desc; desc.skb = skb; - desc.offset = sizeof(struct udphdr); + desc.offset = 0; desc.count = skb->len - desc.offset; if (skb_csum_unnecessary(skb)) -- cgit v1.2.3