]> git.baikalelectronics.ru Git - kernel.git/commit
ip6_udp_tunnel: Fix checksum calculation
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Tue, 25 Nov 2014 04:08:32 +0000 (20:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Nov 2014 19:12:12 +0000 (14:12 -0500)
commit44af3c474c1f497e45d996b51e101150d70f8ea4
tree6191a9b166fdc589aba9aa206eb65030c31d50ce
parent4924632f461898e7e6b87d9f73974eee33378ac5
ip6_udp_tunnel: Fix checksum calculation

The UDP checksum calculation for VXLAN tunnels is currently using the
socket addresses instead of the actual packet source and destination
addresses.  As a result the checksum calculated is incorrect in some
cases.

Also uh->check was being set twice, first it was set to 0, and then it is
set again in udp6_set_csum.  This change removes the redundant assignment
to 0.

Fixes: ac2c717e ("vxlan: Refactor vxlan driver to make use of the common UDP tunnel functions.")
Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_udp_tunnel.c