Skip to content

Commit

Permalink
selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE
Browse files Browse the repository at this point in the history
Since previous commit, MPTCP has support for IP_BIND_ADDRESS_NO_PORT and
IP_LOCAL_PORT_RANGE sockopts.

Add ip4_mptcp and ip6_mptcp fixture variants to ip_local_port_range
selftest to provide selftest coverage for these sockopts.

Acked-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Maxim Galaganov <max@internet.ru>
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Maxim Galaganov authored and David S. Miller committed Dec 26, 2023
1 parent c85636a commit 122db5e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/testing/selftests/net/ip_local_port_range.c
Original file line number Diff line number Diff line change
@@ -146,6 +146,12 @@ FIXTURE_VARIANT_ADD(ip_local_port_range, ip4_stcp) {
.so_protocol = IPPROTO_SCTP,
};

FIXTURE_VARIANT_ADD(ip_local_port_range, ip4_mptcp) {
.so_domain = AF_INET,
.so_type = SOCK_STREAM,
.so_protocol = IPPROTO_MPTCP,
};

FIXTURE_VARIANT_ADD(ip_local_port_range, ip6_tcp) {
.so_domain = AF_INET6,
.so_type = SOCK_STREAM,
@@ -164,6 +170,12 @@ FIXTURE_VARIANT_ADD(ip_local_port_range, ip6_stcp) {
.so_protocol = IPPROTO_SCTP,
};

FIXTURE_VARIANT_ADD(ip_local_port_range, ip6_mptcp) {
.so_domain = AF_INET6,
.so_type = SOCK_STREAM,
.so_protocol = IPPROTO_MPTCP,
};

TEST_F(ip_local_port_range, invalid_option_value)
{
__u16 val16;

0 comments on commit 122db5e

Please sign in to comment.