selftests: add a selftest for sctp vrf
authorXin Long <lucien.xin@gmail.com>
Wed, 16 Nov 2022 20:01:22 +0000 (15:01 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Nov 2022 11:42:54 +0000 (11:42 +0000)
commita61bd7b9fef34484a3fe144a62f4ec78cc42e20e
treed746e8df31eca28f07a56747232aeba330c09683
parentb712d0328c2c3ab456847f29f711e785f70cd8a5
selftests: add a selftest for sctp vrf

This patch adds 12 small test cases: 01-04 test for the sysctl
net.sctp.l3mdev_accept. 05-10 test for only binding to a right
l3mdev device, the connection can be created. 11-12 test for
two socks binding to different l3mdev devices at the same time,
each of them can process the packets from the corresponding
peer. The tests run for both IPv4 and IPv6 SCTP.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/sctp_hello.c [new file with mode: 0644]
tools/testing/selftests/net/sctp_vrf.sh [new file with mode: 0755]