[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11870848451980-git-send-email-swhiteho@redhat.com>
Date: Tue, 14 Aug 2007 10:47:07 +0100
From: swhiteho@...hat.com
To: linux-kernel@...r.kernel.org, cluster-devel@...hat.com
Cc: Patrick Caulfield <pcaulfie@...hat.com>,
Steven Whitehouse <swhiteho@...hat.com>
Subject: [PATCH] [DLM] zero unused parts of sockaddr_storage
From: Patrick Caulfield <pcaulfie@...hat.com>
When we build a sockaddr_storage for an IP address, clear the unused parts as
they could be used for node comparisons.
I have seen this occasionally make sctp connections fail.
Signed-Off-By: Patrick Caulfield <pcaulfie@...hat.com>
Signed-off-by: Steven Whitehouse <swhiteho@...hat.com>
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index d15fd5f..631bc43 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -313,6 +313,7 @@ static void make_sockaddr(struct sockaddr_storage *saddr, uint16_t port,
in6_addr->sin6_port = cpu_to_be16(port);
*addr_len = sizeof(struct sockaddr_in6);
}
+ memset((char *)saddr + *addr_len, 0, sizeof(struct sockaddr_storage) - *addr_len);
}
/* Close a remote connection and tidy up */
--
1.5.1.2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists