wg-quick: freebsd: rebreak interface loopback, while fixing localhost
The commit 7c833642 ("wg-quick: freebsd: allow loopback to work") was
supposed to make things better, but actually it just started sending
legitimate localhost traffic over the WireGuard interface, which is
really quite bad.
This reverts commit 7c833642dfa342218602ab18e7091e86408d2982.
Reported-by: Matt Smith <matt.xtaz@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
			
			
This commit is contained in:
		
							parent
							
								
									86e0c306b8
								
							
						
					
					
						commit
						2c6cabd73d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -158,7 +158,7 @@ add_addr() {
 | 
				
			||||||
	if [[ $1 == *:* ]]; then
 | 
						if [[ $1 == *:* ]]; then
 | 
				
			||||||
		cmd ifconfig "$INTERFACE" inet6 "$1" alias
 | 
							cmd ifconfig "$INTERFACE" inet6 "$1" alias
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		cmd ifconfig "$INTERFACE" inet "$1" 127.0.0.1 alias
 | 
							cmd ifconfig "$INTERFACE" inet "$1" "${1%%/*}" alias
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue