wg: do not use AI_ADDRCONFIG
Some people run wg(8) using hard coded v6 addresses before interfaces have v6 addresses, causing getaddrinfo to fail. Since AI_ADDRCONFIG doesn't actualy change the sorting, but just the queries made, we don't really need AI_ADDRCONFIG anyway, since we're always only taking the first result. Reported-by: Benedikt Morbach <benedikt.morbach@googlemail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
		
							parent
							
								
									b5415c0b65
								
							
						
					
					
						commit
						a488f1b084
					
				@ -128,8 +128,7 @@ static inline bool parse_endpoint(struct sockaddr_storage *endpoint, const char
 | 
			
		||||
	struct addrinfo hints = {
 | 
			
		||||
		.ai_family = AF_UNSPEC,
 | 
			
		||||
		.ai_socktype = SOCK_DGRAM,
 | 
			
		||||
		.ai_protocol = IPPROTO_UDP,
 | 
			
		||||
		.ai_flags = AI_ADDRCONFIG
 | 
			
		||||
		.ai_protocol = IPPROTO_UDP
 | 
			
		||||
	};
 | 
			
		||||
	if (!strlen(value)) {
 | 
			
		||||
		free(mutable);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user