Skip to content

Commit

Permalink
[DLM] zero unused parts of sockaddr_storage
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
  • Loading branch information
Patrick Caulfield authored and swhiteho committed Aug 14, 2007
1 parent 41684f9 commit 01c8cab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 01c8cab

Please sign in to comment.