wg-quick: android: use right regex for host-vs-IP
Looks like the "is valid ifname" regex was copy and pasted from wg-quick.bash instead of the "is valid IP" regex. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
		
							parent
							
								
									1fd9570839
								
							
						
					
					
						commit
						c0b68d2eaf
					
				@ -855,7 +855,7 @@ static void set_dnses(unsigned int netid, const char *dnses)
 | 
				
			|||||||
	if (!len)
 | 
						if (!len)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	xregcomp(®ex_ipnothost, "^[a-zA-Z0-9_=+.-]{1,15}$", REG_EXTENDED | REG_NOSUB);
 | 
						xregcomp(®ex_ipnothost, "(^[0-9.]+$)|(^.*:.*$)", REG_EXTENDED | REG_NOSUB);
 | 
				
			||||||
	for (char *dns = strtok(mutable, ", \t\n"); dns; dns = strtok(NULL, ", \t\n")) {
 | 
						for (char *dns = strtok(mutable, ", \t\n"); dns; dns = strtok(NULL, ", \t\n")) {
 | 
				
			||||||
		if (strchr(dns, '\'') || strchr(dns, '\\'))
 | 
							if (strchr(dns, '\'') || strchr(dns, '\\'))
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user