]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
udp: fix IP_CHECKSUM handling
authorEric Dumazet <edumazet@google.com>
Mon, 24 Oct 2016 01:03:06 +0000 (18:03 -0700)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 6 Dec 2016 16:52:30 +0000 (16:52 +0000)
commit889ac0d5811c269134be830f0cb004269a07a947
treee4ee81391ecaf0020d345059e6128b41e9d7371d
parentc67f7028dcf4d469c0d1d5141c8b960fe6b3d128
udp: fix IP_CHECKSUM handling

BugLink: http://bugs.launchpad.net/bugs/1642573
[ Upstream commit 10df8e6152c6c400a563a673e9956320bfce1871 ]

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@google.com>
Cc: Sam Kumar <samanthakumar@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Tested-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
include/net/ip.h
net/ipv4/ip_sockglue.c
net/ipv4/udp.c
net/ipv6/udp.c