From: TriangleSnake Date: Mon, 5 May 2025 07:13:06 +0000 (+0800) Subject: wg-quick: linux: add 'dev' to 'ip link add' to avoid keyword conflicts X-Git-Tag: v1.0.20250521~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a2dbc3377e0f16f57f856e696162da62ab5b3766;p=thirdparty%2Fwireguard-tools.git wg-quick: linux: add 'dev' to 'ip link add' to avoid keyword conflicts Signed-off-by: TriangleSnake Signed-off-by: Jason A. Donenfeld --- diff --git a/src/wg-quick/linux.bash b/src/wg-quick/linux.bash index 4193ce5..93df80d 100755 --- a/src/wg-quick/linux.bash +++ b/src/wg-quick/linux.bash @@ -87,7 +87,7 @@ auto_su() { add_if() { local ret - if ! cmd ip link add "$INTERFACE" type wireguard; then + if ! cmd ip link add dev "$INTERFACE" type wireguard; then ret=$? [[ -e /sys/module/wireguard ]] || ! command -v "${WG_QUICK_USERSPACE_IMPLEMENTATION:-wireguard-go}" >/dev/null && exit $ret echo "[!] Missing WireGuard kernel module. Falling back to slow userspace implementation." >&2