]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Oct 2017 01:50:42 +0000 (02:50 +0100)
commit5b290dc10e653364044bf6c43fd25299241bc2dc
tree50176418506f5d71ba0c3ebe47dbcf37b265f1d0
parent76c86e237957c6a45d671e8ae03a1cd78232db61
geneve: Fix function matching VNI and tunnel ID on big-endian

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: bd6de601cdfb ("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>
drivers/net/geneve.c