Skip to contentSkip to conversation

tests/sctp: add client peeloff tests

PATCH Superseded Ondrej Mosnacek 2 participants 3 messages Oct 21, 2021 SELinux security module

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/sctp: add client peeloff tests

Currently the testsuite only verifies that SCTP peeloff works on the server side. However, it can just as well be used on the client side as well, which isn't being tested (and actually is buggy at the time of writing).

To correct this, add a simple SCTP peeloff client and a couple tests that verify that the client-side peeloff works well with SELinux.

---

Note: Current kernels will fail these new tests due to a kernel bug. Fix is coming shortly...

 tests/sctp/.gitignore            |   1 +
 tests/sctp/Makefile              |   3 +-
 tests/sctp/sctp_peeloff_client.c | 253 +++++++++++++++++++++++++++++++
 tests/sctp/test                  | 132 +++++++++++++++-
 4 files changed, 382 insertions(+), 7 deletions(-)
 create mode 100644 tests/sctp/sctp_peeloff_client.c
tests/sctp/.gitignore +1 -0
index c022b11..58e8c53 100644
@@ -4,5 +4,6 @@ sctp_bind
 sctp_bindx
 sctp_client
 sctp_connectx
+sctp_peeloff_client
 sctp_peeloff_server
 sctp_server
tests/sctp/Makefile +2 -1
index dd151fb..5e03650 100644
@@ -1,5 +1,6 @@
 TARGETS = sctp_client sctp_server sctp_bind sctp_bindx sctp_connectx \
-	sctp_asconf_params_client sctp_asconf_params_server sctp_peeloff_server
+	sctp_asconf_params_client sctp_asconf_params_server \
+	sctp_peeloff_client sctp_peeloff_server
 
 DEPS = sctp_common.c sctp_common.h
 CFLAGS ?= -Wall
tests/sctp/sctp_peeloff_client.c new file +253 -0

253 lines not on this page · raw message

tests/sctp/test +126 -6

212 lines not on this page · raw message

Signature · 1 line
2.31.1
maintainer
#1 lore raw
Quoted 5 lines · Ondrej Mosnacek

Currently the testsuite only verifies that SCTP peeloff works on the server side. However, it can just as well be used on the client side as well, which isn't being tested (and actually is buggy at the time of writing).

Can you elaborate a bit on that last part, curious minds want to know ...

Signature · 2 lines
paul moore
www.paul-moore.com
#2 lore raw
Quoted 8 lines · Paul Moore
Quoted 5 lines · Ondrej Mosnacek

Currently the testsuite only verifies that SCTP peeloff works on the server side. However, it can just as well be used on the client side as well, which isn't being tested (and actually is buggy at the time of writing).

Can you elaborate a bit on that last part, curious minds want to know ...

There's a bit more information in the relevant kernel patch I have just posted:
https://lore.kernel.org/selinux/[email protected]/T/

Signature · 3 lines
Ondrej Mosnacek
Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.