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>
This commit is contained in:
Alexander Aring 2025-04-29 16:29:12 -04:00 committed by David Teigland
parent 55612ddb62
commit 574511615a

View 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;