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.

Signed-off-by: Maxim Galaganov <[email protected]>
  • Loading branch information
darkwrat authored and intel-lab-lkp committed Nov 29, 2023
1 parent 845cbb6 commit 53cfdbe
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
Expand Up @@ -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,
Expand All @@ -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;
Expand Down

0 comments on commit 53cfdbe

Please sign in to comment.