summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPatrick Caulfield <pcaulfie@redhat.com>2007-07-17 17:53:15 +0200
committerSteven Whitehouse <swhiteho@redhat.com>2007-08-14 11:29:27 +0200
commit01c8cab25863de007fe8c598d0033919ea8ae65e (patch)
treeb7945a4766743ad4dd559681b65bb9e3d230a4a8 /fs
parent[DLM] fix NULL ls usage (diff)
downloadlinux-01c8cab25863de007fe8c598d0033919ea8ae65e.tar.xz
linux-01c8cab25863de007fe8c598d0033919ea8ae65e.zip
[DLM] zero unused parts of sockaddr_storage
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@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/dlm/lowcomms.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index d15fd5f9f5c5..631bc431e6af 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 */