History

selftests/landlock: Test that MPTCP actions are not restricted

Extend protocol fixture with test suits for MPTCP protocol. Add CONFIG_MPTCP and CONFIG_MPTCP_IPV6 options in config.

Mikhail Ivanov committed 1 year ago

Commit 3d403391 parent f5534d52 files · +46 −0Browse files

Unified · Split

2 files
  1. tools/testing/selftests/landlock/config +2 −0
  2. tools/testing/selftests/landlock/net_test.c +44 −0
tools/testing/selftests/landlock/config+2−0
@@ -4,6 +4,8 @@ CONFIG_CGROUP_SCHED=y · 3 unmodified lines
4CONFIG_INET=y4CONFIG_INET=y
5CONFIG_IPV6=y5CONFIG_IPV6=y
6CONFIG_KEYS=y6CONFIG_KEYS=y
7CONFIG_MPTCP=y
8CONFIG_MPTCP_IPV6=y
7CONFIG_NET=y9CONFIG_NET=y
8CONFIG_NET_NS=y10CONFIG_NET_NS=y
9CONFIG_OVERLAY_FS=y11CONFIG_OVERLAY_FS=y
tools/testing/selftests/landlock/net_test.c+44−0
@@ -312,6 +312,17 @@ FIXTURE_VARIANT_ADD(protocol, no_sandbox_with_ipv4_tcp2) { · 311 unmodified lines
312 },312 },
313};313};
314 314
315/* clang-format off */
316FIXTURE_VARIANT_ADD(protocol, no_sandbox_with_ipv4_mptcp) {
317 /* clang-format on */
318 .sandbox = NO_SANDBOX,
319 .prot = {
320 .domain = AF_INET,
321 .type = SOCK_STREAM,
322 .protocol = IPPROTO_MPTCP,
323 },
324};
325
315/* clang-format off */326/* clang-format off */
316FIXTURE_VARIANT_ADD(protocol, no_sandbox_with_ipv6_tcp1) {327FIXTURE_VARIANT_ADD(protocol, no_sandbox_with_ipv6_tcp1) {
317 /* clang-format on */328 /* clang-format on */
@@ -335,6 +346,17 @@ FIXTURE_VARIANT_ADD(protocol, no_sandbox_with_ipv6_tcp2) { · 17 unmodified lines
335 },346 },
336};347};
337 348
349/* clang-format off */
350FIXTURE_VARIANT_ADD(protocol, no_sandbox_with_ipv6_mptcp) {
351 /* clang-format on */
352 .sandbox = NO_SANDBOX,
353 .prot = {
354 .domain = AF_INET6,
355 .type = SOCK_STREAM,
356 .protocol = IPPROTO_MPTCP,
357 },
358};
359
338/* clang-format off */360/* clang-format off */
339FIXTURE_VARIANT_ADD(protocol, no_sandbox_with_ipv4_udp) {361FIXTURE_VARIANT_ADD(protocol, no_sandbox_with_ipv4_udp) {
340 /* clang-format on */362 /* clang-format on */
@@ -398,6 +420,17 @@ FIXTURE_VARIANT_ADD(protocol, tcp_sandbox_with_ipv4_tcp2) { · 57 unmodified lines
398 },420 },
399};421};
400 422
423/* clang-format off */
424FIXTURE_VARIANT_ADD(protocol, tcp_sandbox_with_ipv4_mptcp) {
425 /* clang-format on */
426 .sandbox = TCP_SANDBOX,
427 .prot = {
428 .domain = AF_INET,
429 .type = SOCK_STREAM,
430 .protocol = IPPROTO_MPTCP,
431 },
432};
433
401/* clang-format off */434/* clang-format off */
402FIXTURE_VARIANT_ADD(protocol, tcp_sandbox_with_ipv6_tcp1) {435FIXTURE_VARIANT_ADD(protocol, tcp_sandbox_with_ipv6_tcp1) {
403 /* clang-format on */436 /* clang-format on */
@@ -421,6 +454,17 @@ FIXTURE_VARIANT_ADD(protocol, tcp_sandbox_with_ipv6_tcp2) { · 17 unmodified lines
421 },454 },
422};455};
423 456
457/* clang-format off */
458FIXTURE_VARIANT_ADD(protocol, tcp_sandbox_with_ipv6_mptcp) {
459 /* clang-format on */
460 .sandbox = TCP_SANDBOX,
461 .prot = {
462 .domain = AF_INET6,
463 .type = SOCK_STREAM,
464 .protocol = IPPROTO_MPTCP,
465 },
466};
467
424/* clang-format off */468/* clang-format off */
425FIXTURE_VARIANT_ADD(protocol, tcp_sandbox_with_ipv4_udp) {469FIXTURE_VARIANT_ADD(protocol, tcp_sandbox_with_ipv4_udp) {
426 /* clang-format on */470 /* clang-format on */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t