aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/sunrpc/svcsock.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2016-04-07 11:44:58 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-11 15:31:33 -0400
commit1da8c681d5c122afe9fbadc02e92a0f9e3f7af44 (patch)
tree16d382daa5ef48f18f4afe6b0766d35a5a5f45b0 /net/sunrpc/svcsock.c
parentnet: ipv4: Consider failed nexthops in multipath routes (diff)
downloadwireguard-linux-1da8c681d5c122afe9fbadc02e92a0f9e3f7af44.tar.xz
wireguard-linux-1da8c681d5c122afe9fbadc02e92a0f9e3f7af44.zip
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. <fcooper@ti.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Tested-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r--net/sunrpc/svcsock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 1413cdcc131c..71d6072664d2 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -617,7 +617,7 @@ static int svc_udp_recvfrom(struct svc_rqst *rqstp)
svsk->sk_sk->sk_stamp = skb->tstamp;
set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); /* there may be more data... */
- len = skb->len - sizeof(struct udphdr);
+ len = skb->len;
rqstp->rq_arg.len = len;
rqstp->rq_prot = IPPROTO_UDP;
@@ -641,8 +641,7 @@ static int svc_udp_recvfrom(struct svc_rqst *rqstp)
skb_free_datagram_locked(svsk->sk_sk, skb);
} else {
/* we can use it in-place */
- rqstp->rq_arg.head[0].iov_base = skb->data +
- sizeof(struct udphdr);
+ rqstp->rq_arg.head[0].iov_base = skb->data;
rqstp->rq_arg.head[0].iov_len = len;
if (skb_checksum_complete(skb))
goto out_free;