]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rxrpc: do not pull udp headers on receive
authorWillem de Bruijn <willemb@google.com>
Thu, 7 Apr 2016 15:44:59 +0000 (11:44 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2016 19:31:33 +0000 (15:31 -0400)
Commit e6afc8ace6dd 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: e6afc8ace6dd ("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>
net/rxrpc/ar-input.c

index 63ed75c40e29a1739470f90e21d5f60d1bab8fe1..4824a827d10d68e0c73a27b8b3a202eb7be8fcd8 100644 (file)
@@ -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));