Skip to content

Commit 122db5e

Browse files
darkwratdavem330
authored andcommitted
selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE
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 <[email protected]> Signed-off-by: Maxim Galaganov <[email protected]> Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c85636a commit 122db5e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/testing/selftests/net/ip_local_port_range.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ FIXTURE_VARIANT_ADD(ip_local_port_range, ip4_stcp) {
146146
.so_protocol = IPPROTO_SCTP,
147147
};
148148

149+
FIXTURE_VARIANT_ADD(ip_local_port_range, ip4_mptcp) {
150+
.so_domain = AF_INET,
151+
.so_type = SOCK_STREAM,
152+
.so_protocol = IPPROTO_MPTCP,
153+
};
154+
149155
FIXTURE_VARIANT_ADD(ip_local_port_range, ip6_tcp) {
150156
.so_domain = AF_INET6,
151157
.so_type = SOCK_STREAM,
@@ -164,6 +170,12 @@ FIXTURE_VARIANT_ADD(ip_local_port_range, ip6_stcp) {
164170
.so_protocol = IPPROTO_SCTP,
165171
};
166172

173+
FIXTURE_VARIANT_ADD(ip_local_port_range, ip6_mptcp) {
174+
.so_domain = AF_INET6,
175+
.so_type = SOCK_STREAM,
176+
.so_protocol = IPPROTO_MPTCP,
177+
};
178+
167179
TEST_F(ip_local_port_range, invalid_option_value)
168180
{
169181
__u16 val16;

0 commit comments

Comments
 (0)