selftests: netfilter: Pass family parameter "-f" to conntrack tool
authorChen Yi <yiche@redhat.com>
Tue, 5 Jan 2021 15:31:20 +0000 (23:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:27:33 +0000 (18:27 +0100)
commit26865769ed8f03c49106c3e2e588733ca55c3525
tree170906dd2c3b839d942e2a923c346e2c268db0bc
parentf0cd3fba4eaeecac987bd490ad5efc6e54507511
selftests: netfilter: Pass family parameter "-f" to conntrack tool

commit fab336b42441e0b2eb1d81becedb45fbdf99606e upstream.

Fix nft_conntrack_helper.sh false fail report:

1) Conntrack tool need "-f ipv6" parameter to show out ipv6 traffic items.

2) Sleep 1 second after background nc send packet, to make sure check
is after this statement executed.

False report:
FAIL: ns1-lkjUemYw did not show attached helper ip set via ruleset
PASS: ns1-lkjUemYw connection on port 2121 has ftp helper attached
...

After fix:
PASS: ns1-2hUniwU2 connection on port 2121 has ftp helper attached
PASS: ns2-2hUniwU2 connection on port 2121 has ftp helper attached
...

Fixes: 619ae8e0697a6 ("selftests: netfilter: add test case for conntrack helper assignment")
Signed-off-by: Chen Yi <yiche@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/netfilter/nft_conntrack_helper.sh