]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests: mptcp: add packet mark test case
authorFlorian Westphal <fw@strlen.de>
Thu, 15 Apr 2021 23:45:02 +0000 (16:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Apr 2021 22:23:10 +0000 (15:23 -0700)
commitdc65fe82fb07e610e03a9b05bd445f46f93175f5
treef5e5bc85146e250aebe7c242338e6e7252bf8620
parentaa1fbd94e5c7d3a356058b4ee4a455d952dd48aa
selftests: mptcp: add packet mark test case

Extend mptcp_connect tool with SO_MARK support (-M <value>) and
add a test case that checks that the packet mark gets copied to all
subflows.

This is done by only allowing packets with either skb->mark 1 or 2
via iptables.

DROP rule packet counter is checked; if its not zero, print an error
message and fail the test case.

Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/Makefile
tools/testing/selftests/net/mptcp/mptcp_connect.c
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh [new file with mode: 0755]