summaryrefslogtreecommitdiff
path: root/pfinet
diff options
context:
space:
mode:
authorAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>2014-09-28 16:05:17 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-09-28 16:08:01 +0200
commit1a22019e6a86d0636f9847f8891f280facd2fd22 (patch)
tree7ea3e9cef9bb0f547bd7f702444496035943d018 /pfinet
parent1bfccb9ff3ff1b079fd4b76a4d3e75e340e6813c (diff)
BSD apps want sin_zero cleared in sys_getname.
Cherry-picked from Linux c1e9dcb37795b08a1f50b8de7b2ad5efcb15728f * pfinet/linux-src/net/ipv4/af_inet.c (inet_getname): Clear `sin_zero' part of `sin'.
Diffstat (limited to 'pfinet')
-rw-r--r--pfinet/linux-src/net/ipv4/af_inet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pfinet/linux-src/net/ipv4/af_inet.c b/pfinet/linux-src/net/ipv4/af_inet.c
index 04e05107..0e52a72c 100644
--- a/pfinet/linux-src/net/ipv4/af_inet.c
+++ b/pfinet/linux-src/net/ipv4/af_inet.c
@@ -755,6 +755,7 @@ static int inet_getname(struct socket *sock, struct sockaddr *uaddr,
sin->sin_port = sk->sport;
sin->sin_addr.s_addr = addr;
}
+ memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
*uaddr_len = sizeof(*sin);
return(0);
}