mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-25 12:37:11 -05:00
selftests: fib_rule_tests: Add port range match tests
Currently, only matching on specific ports is tested. Add port range testing to make sure this use case does not regress. Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20250217134109.311176-8-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
ab35ebfabb
commit
94694aa641
@@ -256,6 +256,14 @@ fib_rule6_test()
|
||||
fib_rule6_test_match_n_redirect "$match" "$match" \
|
||||
"$getnomatch" "sport and dport redirect to table" \
|
||||
"sport and dport no redirect to table"
|
||||
|
||||
match="sport 100-200 dport 300-400"
|
||||
getmatch="sport 100 dport 400"
|
||||
getnomatch="sport 100 dport 401"
|
||||
fib_rule6_test_match_n_redirect "$match" "$getmatch" \
|
||||
"$getnomatch" \
|
||||
"sport and dport range redirect to table" \
|
||||
"sport and dport range no redirect to table"
|
||||
fi
|
||||
|
||||
fib_check_iproute_support "ipproto" "ipproto"
|
||||
@@ -525,6 +533,14 @@ fib_rule4_test()
|
||||
fib_rule4_test_match_n_redirect "$match" "$match" \
|
||||
"$getnomatch" "sport and dport redirect to table" \
|
||||
"sport and dport no redirect to table"
|
||||
|
||||
match="sport 100-200 dport 300-400"
|
||||
getmatch="sport 100 dport 400"
|
||||
getnomatch="sport 100 dport 401"
|
||||
fib_rule4_test_match_n_redirect "$match" "$getmatch" \
|
||||
"$getnomatch" \
|
||||
"sport and dport range redirect to table" \
|
||||
"sport and dport range no redirect to table"
|
||||
fi
|
||||
|
||||
fib_check_iproute_support "ipproto" "ipproto"
|
||||
|
||||
Reference in New Issue
Block a user