]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: vxlan_mdb: Fix failures with old libnet
authorIdo Schimmel <idosch@nvidia.com>
Mon, 25 Mar 2024 07:50:30 +0000 (09:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:35:42 +0000 (16:35 +0200)
commit7fb8b3de7f22adfee1a40562c249974b31e0697e
treefb22d384e418de3e7dc4ef63e23740a852eb7fa4
parent2e22c9cb618716b8e557fe17c3d4958171288082
selftests: vxlan_mdb: Fix failures with old libnet

[ Upstream commit f1425529c33def8b46faae4400dd9e2bbaf16a05 ]

Locally generated IP multicast packets (such as the ones used in the
test) do not perform routing and simply egress the bound device.

However, as explained in commit 8bcfb4ae4d97 ("selftests: forwarding:
Fix failing tests with old libnet"), old versions of libnet (used by
mausezahn) do not use the "SO_BINDTODEVICE" socket option. Specifically,
the library started using the option for IPv6 sockets in version 1.1.6
and for IPv4 sockets in version 1.2. This explains why on Ubuntu - which
uses version 1.1.6 - the IPv4 overlay tests are failing whereas the IPv6
ones are passing.

Fix by specifying the source and destination MAC of the packets which
will cause mausezahn to use a packet socket instead of an IP socket.

Fixes: 62199e3f1658 ("selftests: net: Add VXLAN MDB test")
Reported-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Closes: https://lore.kernel.org/netdev/5bb50349-196d-4892-8ed2-f37543aa863f@alu.unizg.hr/
Tested-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20240325075030.2379513-1-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/test_vxlan_mdb.sh