• Eric Dumazet's avatar
    udp: fix IP_CHECKSUM handling · 10df8e61
    Eric Dumazet authored
    First bug was added in commit ad6f939a ("ip: Add offset parameter to
    ip_cmsg_recv") : Tom missed that ipv4 udp messages could be received on
    AF_INET6 socket. ip_cmsg_recv(msg, skb) should have been replaced by
    ip_cmsg_recv_offset(msg, skb, sizeof(struct udphdr));
    
    Then commit e6afc8ac ("udp: remove headers from UDP packets before
    queueing") forgot to adjust the offsets now UDP headers are pulled
    before skb are put in receive queue.
    
    Fixes: ad6f939a ("ip: Add offset parameter to ip_cmsg_recv")
    Fixes: e6afc8ac ("udp: remove headers from UDP packets before queueing")
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Cc: Sam Kumar <samanthakumar@google.com>
    Cc: Willem de Bruijn <willemb@google.com>
    Tested-by: default avatarWillem de Bruijn <willemb@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    10df8e61
ip_sockglue.c 35.8 KB