wg-quick: do not set explicit src route for v6 default route
This was only required because clueless network operators were trying to route fec0::/10 globally, when that range doesn't actually have global scope. Now that we understand the cause was operator error, we revert the change here, so that the routing table is kept consistent. This reverts commit 64e47de870a2f0575b5564a70e5680b48ab83ff9. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
91fb17a014
commit
11204afd6f
|
@ -144,18 +144,10 @@ add_default() {
|
||||||
((DEFAULT_TABLE++))
|
((DEFAULT_TABLE++))
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
local proto=-4 src ip
|
local proto=-4
|
||||||
if [[ $1 == *:* ]]; then
|
[[ $1 == *:* ]] && proto=-6
|
||||||
proto=-6
|
|
||||||
for ip in "${ADDRESSES[@]}"; do
|
|
||||||
if [[ $ip == *:* ]]; then
|
|
||||||
src="src ${ip%/*}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
cmd wg set "$INTERFACE" fwmark $DEFAULT_TABLE
|
cmd wg set "$INTERFACE" fwmark $DEFAULT_TABLE
|
||||||
cmd ip $proto route add "$1" $src dev "$INTERFACE" table $DEFAULT_TABLE
|
cmd ip $proto route add "$1" dev "$INTERFACE" table $DEFAULT_TABLE
|
||||||
cmd ip $proto rule add not fwmark $DEFAULT_TABLE table $DEFAULT_TABLE
|
cmd ip $proto rule add not fwmark $DEFAULT_TABLE table $DEFAULT_TABLE
|
||||||
cmd ip $proto rule add table main suppress_prefixlength 0
|
cmd ip $proto rule add table main suppress_prefixlength 0
|
||||||
local key value
|
local key value
|
||||||
|
|
Loading…
Reference in a new issue