mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-29 00:42:58 +02:00
wireguard: fix wg-quick on linux5.1
This commit is contained in:
parent
1561f9953d
commit
5b8771b3a6
2 changed files with 29 additions and 1 deletions
28
srcpkgs/wireguard/patches/wg-quick-iproute2.patch
Normal file
28
srcpkgs/wireguard/patches/wg-quick-iproute2.patch
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
From c09671aa1318f52e0c0b5d2310b72644e9b2ea96 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
|
||||||
|
Date: Fri, 17 May 2019 12:32:46 +0200
|
||||||
|
Subject: wg-quick: look up existing routes properly
|
||||||
|
|
||||||
|
This was never really correct, and then 5.1 broke it entirely.
|
||||||
|
|
||||||
|
Reported-by: piraty1@inbox.ru
|
||||||
|
---
|
||||||
|
src/tools/wg-quick/linux.bash | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/tools/wg-quick/linux.bash b/src/tools/wg-quick/linux.bash
|
||||||
|
index 5eaa5042..8f1812c1 100755
|
||||||
|
--- src/tools/wg-quick/linux.bash
|
||||||
|
+++ src/tools/wg-quick/linux.bash
|
||||||
|
@@ -164,7 +164,7 @@ add_route() {
|
||||||
|
elif [[ $1 == */0 ]]; then
|
||||||
|
add_default "$1"
|
||||||
|
else
|
||||||
|
- [[ $(ip route get "$1" 2>/dev/null) == *dev\ $INTERFACE\ * ]] || cmd ip route add "$1" dev "$INTERFACE"
|
||||||
|
+ [[ -n $(ip route show dev "$INTERFACE" match "$1" 2>/dev/null) ]] || cmd ip route add "$1" dev "$INTERFACE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v1.2.1-20-gc37e
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'wireguard'
|
# Template file for 'wireguard'
|
||||||
pkgname=wireguard
|
pkgname=wireguard
|
||||||
version=0.0.20190406
|
version=0.0.20190406
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="WireGuard-${version}"
|
wrksrc="WireGuard-${version}"
|
||||||
build_wrksrc="src/tools"
|
build_wrksrc="src/tools"
|
||||||
build_style=gnu-makefile
|
build_style=gnu-makefile
|
||||||
|
|
Loading…
Add table
Reference in a new issue