Commit 1a26bfaf authored by Alexander Aring's avatar Alexander Aring Committed by David Teigland
Browse files

fs: dlm: fix check for multi-homed hosts



This patch will use the runtime array size dlm_local_count variable
to check the actual size of the dlm_local_addr array. There exists
currently a cleanup bug, because the tcp_listen_for_all() functionality
might check on a dangled pointer.

Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent d11ccd45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1288,7 +1288,7 @@ out:
static int tcp_listen_for_all(void)
{
	/* We don't support multi-homed hosts */
	if (dlm_local_addr[1] != NULL) {
	if (dlm_local_count > 1) {
		log_print("TCP protocol can't handle multi-homed hosts, "
			  "try SCTP");
		return -EINVAL;