diff options
author | Willem de Bruijn <willemb@google.com> | 2016-04-07 18:44:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-11 22:31:33 +0300 |
commit | 1da8c681d5c122afe9fbadc02e92a0f9e3f7af44 (patch) | |
tree | 16d382daa5ef48f18f4afe6b0766d35a5a5f45b0 /net/sunrpc/xprtsock.c | |
parent | a6db4494d218c2e559173661ee972e048dc04fdd (diff) | |
download | linux-1da8c681d5c122afe9fbadc02e92a0f9e3f7af44.tar.xz |
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/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 65e759569e48..c1fc7b20bbc1 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -995,15 +995,14 @@ static void xs_udp_data_read_skb(struct rpc_xprt *xprt, u32 _xid; __be32 *xp; - repsize = skb->len - sizeof(struct udphdr); + repsize = skb->len; if (repsize < 4) { dprintk("RPC: impossible RPC reply size %d!\n", repsize); return; } /* Copy the XID from the skb... */ - xp = skb_header_pointer(skb, sizeof(struct udphdr), - sizeof(_xid), &_xid); + xp = skb_header_pointer(skb, 0, sizeof(_xid), &_xid); if (xp == NULL) return; |