aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2025-04-29 16:29:12 -0400
committerDavid Teigland <teigland@redhat.com>2025-04-30 09:26:34 -0500
commit574511615a2e17e5dfe4754f6e9cea005b6c718a (patch)
tree3b11246fc314591d225ab25d518e291d9e6d8857
parentdlm: use SHUT_RDWR for SCTP shutdown (diff)
downloadwireguard-linux-574511615a2e17e5dfe4754f6e9cea005b6c718a.tar.xz
wireguard-linux-574511615a2e17e5dfe4754f6e9cea005b6c718a.zip
dlm: reject SCTP configuration if not enabled
Reject SCTP dlm configuration if the kernel was never build with SCTP. Currently the only one known user space tool "dlm_controld" will drop an error in the logs and getting stuck. This behaviour should be fixed to deliver an error to the user or fallback to TCP. Signed-off-by: Alexander Aring <aahringo@redhat.com> Reviewed-by: Heming zhao <heming.zhao@suse.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/dlm/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index cf9ba6fd7a28..a23fd524a6ee 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -197,6 +197,9 @@ static int dlm_check_protocol_and_dlm_running(unsigned int x)
break;
case 1:
/* SCTP */
+ if (!IS_ENABLED(CONFIG_IP_SCTP))
+ return -EOPNOTSUPP;
+
break;
default:
return -EINVAL;