mirror of
				https://github.com/rofl0r/proxychains-ng.git
				synced 2025-11-04 09:06:05 +00: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:
		@@ -897,7 +897,7 @@ int proxy_getaddrinfo(const char *node, const char *service, const struct addrin
 | 
				
			|||||||
	p->ai_canonname = space->addr_name;
 | 
						p->ai_canonname = space->addr_name;
 | 
				
			||||||
	p->ai_next = NULL;
 | 
						p->ai_next = NULL;
 | 
				
			||||||
	p->ai_family = space->sockaddr_space.ss_family = af;
 | 
						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) {
 | 
						if(hints) {
 | 
				
			||||||
		p->ai_socktype = hints->ai_socktype;
 | 
							p->ai_socktype = hints->ai_socktype;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user