[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF=yD-+zykFwYUzhOZGcs6ywaGR3x2Qnvf1J4GYUYRf5gfTPTw@mail.gmail.com>
Date: Tue, 25 Oct 2016 15:43:34 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Sam Kumar <samanthakumar@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
Tom Herbert <tom@...bertland.com>
Subject: Re: [PATCH net] udp: fix IP_CHECKSUM handling
On Sun, Oct 23, 2016 at 9:03 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> First bug was added in commit ad6f939ab193 ("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 e6afc8ace6dd ("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: ad6f939ab193 ("ip: Add offset parameter to ip_cmsg_recv")
> Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Sam Kumar <samanthakumar@...gle.com>
> Cc: Willem de Bruijn <willemb@...gle.com>
> ---
> Tom, I would appreciate your feedback on this patch, I presume
> you have tests to verify IP_CHECKSUM feature ? Thanks !
>
Tested-by: Willem de Bruijn <willemb@...gle.com>
Thanks for fixing, Eric.
Tested with https://github.com/wdebruij/kerneltools/blob/master/tests/recv_cmsg_ipchecksum.c
Powered by blists - more mailing lists