wg-quick: preliminary support for go implementation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
f8a990763a
commit
0b64881c7a
|
@ -83,7 +83,13 @@ auto_su() {
|
||||||
}
|
}
|
||||||
|
|
||||||
add_if() {
|
add_if() {
|
||||||
cmd ip link add "$INTERFACE" type wireguard
|
local ret
|
||||||
|
if ! cmd ip link add "$INTERFACE" type wireguard; then
|
||||||
|
ret=$?
|
||||||
|
[[ -e /sys/module/wireguard ]] || ! command -v wireguard-go >/dev/null && return $ret
|
||||||
|
echo "[!] Missing WireGuard kernel module. Falling back to slow userspace implementation."
|
||||||
|
cmd wireguard-go "$INTERFACE"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
del_if() {
|
del_if() {
|
||||||
|
|
Loading…
Reference in a new issue