ntpd: locally bind every peer socket. +22 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-11-24 16:03:47 +01:00
parent 9cc60d7e6b
commit b1278a38bc
3 changed files with 64 additions and 28 deletions

View File

@@ -346,7 +346,7 @@ int FAST_FUNC xsocket_type(len_and_sockaddr **lsap, IF_FEATURE_IPV6(int family,)
len = sizeof(struct sockaddr_in6);
}
#endif
lsa = xzalloc(offsetof(len_and_sockaddr, u.sa) + len);
lsa = xzalloc(LSA_LEN_SIZE + len);
lsa->len = len;
lsa->u.sa.sa_family = family;
*lsap = lsa;