OSDN Git Service

selftests: fib_rule_tests: Test UDP and TCP connections with DSCP rules.
authorGuillaume Nault <gnault@redhat.com>
Wed, 8 Feb 2023 17:14:07 +0000 (18:14 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Feb 2023 06:49:04 +0000 (22:49 -0800)
commitc21a20d9d102ab809a992a6b056abbec4cd4c1cd
treea6a73ddb7b0e655014ff9ae26865b026ae634038
parent8230680f36fd1525303d1117768c8852314c488c
selftests: fib_rule_tests: Test UDP and TCP connections with DSCP rules.

Add the fib_rule6_send and fib_rule4_send tests to verify that DSCP
values are properly taken into account when UDP or TCP sockets try to
connect().

Tests are done with nettest, which needs a new option to specify
the DS Field value of the socket being tested. This new option is
named '-Q', in reference to the similar option used by ping.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/fib_rule_tests.sh
tools/testing/selftests/net/nettest.c