mirror of
				https://github.com/rofl0r/proxychains-ng.git
				synced 2025-11-04 00:56:03 +00:00 
			
		
		
		
	proxy_gethostbyname(): fix failure to omit DNS lookup for ipv4 addrs
gethostbyname() is specified to transform simple numeric ipv4 addresses into their binary form. since proxy_gethostbyname() was used as a backend for all resolver functions, somehow we assumed the check for an ipv4 was done from another site, however this didn't hold true when the caller used gethostbyname() directly. fixes #347
This commit is contained in:
		@@ -849,6 +849,11 @@ struct hostent *proxy_gethostbyname(const char *name, struct gethostbyname_data*
 | 
			
		||||
	data->hostent_space.h_addrtype = AF_INET;
 | 
			
		||||
	data->hostent_space.h_length = sizeof(in_addr_t);
 | 
			
		||||
 | 
			
		||||
	if(pc_isnumericipv4(name)) {
 | 
			
		||||
		data->resolved_addr = inet_addr(name);
 | 
			
		||||
		goto retname;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	gethostname(buff, sizeof(buff));
 | 
			
		||||
 | 
			
		||||
	if(!strcmp(buff, name)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user