cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] dlm: zero unused parts of sockaddr_storage
@ 2007-07-17 15:53 Patrick Caulfield
  2007-07-17 16:09 ` Steven Whitehouse
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Caulfield @ 2007-07-17 15:53 UTC (permalink / raw)
  To: cluster-devel.redhat.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@redhat.com>

Patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zerosockaddr.patch
Type: text/x-patch
Size: 449 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070717/70464d87/attachment.bin>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Cluster-devel] [PATCH] dlm: zero unused parts of sockaddr_storage
  2007-07-17 15:53 [Cluster-devel] [PATCH] dlm: zero unused parts of sockaddr_storage Patrick Caulfield
@ 2007-07-17 16:09 ` Steven Whitehouse
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Whitehouse @ 2007-07-17 16:09 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

On Tue, 2007-07-17 at 16:53 +0100, Patrick Caulfield wrote:
> 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>
> 
> Patrick

Now in the -nmw git tree. Thanks,

Steve.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Cluster-devel] [PATCH] [DLM] zero unused parts of sockaddr_storage
  2007-08-14  9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
@ 2007-08-14  9:47 ` swhiteho
  0 siblings, 0 replies; 3+ messages in thread
From: swhiteho @ 2007-08-14  9:47 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Patrick Caulfield <pcaulfie@redhat.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@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-14  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-17 15:53 [Cluster-devel] [PATCH] dlm: zero unused parts of sockaddr_storage Patrick Caulfield
2007-07-17 16:09 ` Steven Whitehouse
  -- strict thread matches above, loose matches on Subject: below --
2007-08-14  9:47 [Cluster-devel] [PATCH] [DLM] Clear othercon pointers when a connection is closed swhiteho
2007-08-14  9:47 ` [Cluster-devel] [PATCH] [DLM] zero unused parts of sockaddr_storage swhiteho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).