mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-06 21:02:55 +08:00
proxy_getaddrinfo: don't use sizeof(struct sockaddr_storage) for addr_len
this should fix an issue which seems to be mac's bind() only accepting sizeof(struct sockaddr_in) for AF_INET. ref: https://github.com/rofl0r/microsocks/issues/19
This commit is contained in:
parent
5ad7c2a183
commit
de4460fbd1
@ -897,7 +897,7 @@ int proxy_getaddrinfo(const char *node, const char *service, const struct addrin
|
||||
p->ai_canonname = space->addr_name;
|
||||
p->ai_next = NULL;
|
||||
p->ai_family = space->sockaddr_space.ss_family = af;
|
||||
p->ai_addrlen = sizeof(space->sockaddr_space);
|
||||
p->ai_addrlen = af == AF_INET ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6);
|
||||
|
||||
if(hints) {
|
||||
p->ai_socktype = hints->ai_socktype;
|
||||
|
Loading…
Reference in New Issue
Block a user