Skip to content

Commit

Permalink
rxrpc: do not pull udp headers on receive
Browse files Browse the repository at this point in the history
Commit e6afc8a modified the udp receive path by pulling the udp
header before queuing an skbuff onto the receive queue.

Rxrpc 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: e6afc8a ("udp: remove headers from UDP packets before queueing")

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>
  • Loading branch information
Willem de Bruijn authored and David S. Miller committed Apr 11, 2016
1 parent 1da8c68 commit 4d0fc73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/rxrpc/ar-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,9 @@ int rxrpc_extract_header(struct rxrpc_skb_priv *sp, struct sk_buff *skb)
struct rxrpc_wire_header whdr;

/* dig out the RxRPC connection details */
if (skb_copy_bits(skb, sizeof(struct udphdr), &whdr, sizeof(whdr)) < 0)
if (skb_copy_bits(skb, 0, &whdr, sizeof(whdr)) < 0)
return -EBADMSG;
if (!pskb_pull(skb, sizeof(struct udphdr) + sizeof(whdr)))
if (!pskb_pull(skb, sizeof(whdr)))
BUG();

memset(sp, 0, sizeof(*sp));
Expand Down

0 comments on commit 4d0fc73

Please sign in to comment.