selftests: forwarding: lib: Parameterize IGMPv3/MLDv2 generation
authorPetr Machata <petrm@nvidia.com>
Thu, 2 Feb 2023 17:59:31 +0000 (18:59 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Feb 2023 08:48:26 +0000 (08:48 +0000)
commit506a1ac9d32b52606f59acbb0e20c1a7adbb8511
treeede0ac8ec43f7c4254edb1a8c88f4b816d8ad859
parent952e0ee38c7215c45192d8c899acd1830873f28b
selftests: forwarding: lib: Parameterize IGMPv3/MLDv2 generation

In order to generate IGMPv3 and MLDv2 packets on the fly, the
functions that generate these packets need to be able to generate
packets for different groups and different sources. Generating MLDv2
packets further needs the source address of the packet for purposes of
checksum calculation. Add the necessary parameters, and generate the
payload accordingly by dispatching to helpers added in the previous
patches.

Adjust the sole client, bridge_mdb.sh, as well.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/bridge_mdb.sh
tools/testing/selftests/net/forwarding/lib.sh