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
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -128,8 +128,7 @@ static inline bool parse_endpoint(struct sockaddr_storage *endpoint, const char
 | 
				
			||||||
	struct addrinfo hints = {
 | 
						struct addrinfo hints = {
 | 
				
			||||||
		.ai_family = AF_UNSPEC,
 | 
							.ai_family = AF_UNSPEC,
 | 
				
			||||||
		.ai_socktype = SOCK_DGRAM,
 | 
							.ai_socktype = SOCK_DGRAM,
 | 
				
			||||||
		.ai_protocol = IPPROTO_UDP,
 | 
							.ai_protocol = IPPROTO_UDP
 | 
				
			||||||
		.ai_flags = AI_ADDRCONFIG
 | 
					 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
	if (!strlen(value)) {
 | 
						if (!strlen(value)) {
 | 
				
			||||||
		free(mutable);
 | 
							free(mutable);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue