]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dlm: reject SCTP configuration if not enabled
authorAlexander Aring <aahringo@redhat.com>
Tue, 29 Apr 2025 20:29:12 +0000 (16:29 -0400)
committerDavid Teigland <teigland@redhat.com>
Wed, 30 Apr 2025 14:26:34 +0000 (09:26 -0500)
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>
fs/dlm/config.c

index cf9ba6fd7a281f75b6da3487e52b9f47cda33155..a23fd524a6ee35a686d1b0ac385036c668159a38 100644 (file)
@@ -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;