selftests: netfilter: ipvs.sh: move to lib.sh infra
authorFlorian Westphal <fw@strlen.de>
Thu, 11 Apr 2024 23:36:15 +0000 (01:36 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Apr 2024 00:51:26 +0000 (17:51 -0700)
commit87ce7d79075f2eed67327512379112818c8a0303
tree1c9fb3c8966bde4451e6f27541819bc5a258865e
parent10e2ed3fcdf4834ed02beae1860ea2555b484a40
selftests: netfilter: ipvs.sh: move to lib.sh infra

The setup_ns helper makes the netns names random, so replace nsX with $nsX
everywhere.

Replace nc with socat, otherwise script fails on my system due to
incompatible nc versions ("nc: cannot use -p and -l").

Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://lore.kernel.org/r/20240411233624.8129-11-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/netfilter/ipvs.sh