]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
geneve: Fix function matching VNI and tunnel ID on big-endian
authorStefano Brivio <sbrivio@redhat.com>
Thu, 19 Oct 2017 11:31:28 +0000 (13:31 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 14 Mar 2018 10:40:03 +0000 (11:40 +0100)
commit67f0a662620951084a42dd2cbfeac96372aee72f
tree24af8e4e72d97f859fa35a4269bbee6a125dc5bc
parentc02170f44dbec47a7a63377acc19a37a2c6ff7f2
geneve: Fix function matching VNI and tunnel ID on big-endian

BugLink: http://bugs.launchpad.net/bugs/1744121
[ Upstream commit 772e97b57a4aa00170ad505a40ffad31d987ce1d ]

On big-endian machines, functions converting between tunnel ID
and VNI use the three LSBs of tunnel ID storage to map VNI.

The comparison function eq_tun_id_and_vni(), on the other hand,
attempted to map the VNI from the three MSBs. Fix it by using
the same check implemented on LE, which maps VNI from the three
LSBs of tunnel ID.

Fixes: 2e0b26e10352 ("geneve: Optimize geneve device lookup.")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: Jakub Sitnicki <jkbs@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/geneve.c