diff options
author | Aaron Goodman <aaronjg@stanford.edu> | 2020-08-26 21:27:40 -0400 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2020-08-30 21:47:13 +0200 |
commit | 47b2ee2d9a9a1790f9bf8a528640c333af39e4ba (patch) | |
tree | 6e7a2beb8cb0a99712c776eca2320c226cce0238 /package/network | |
parent | 05b8e84362b8455dec6db9b862826f21e8f24341 (diff) | |
download | upstream-47b2ee2d9a9a1790f9bf8a528640c333af39e4ba.tar.gz upstream-47b2ee2d9a9a1790f9bf8a528640c333af39e4ba.tar.bz2 upstream-47b2ee2d9a9a1790f9bf8a528640c333af39e4ba.zip |
wireguard-tools: add tunlink option for hostroute
In a multi-wan setup, netifd may need guidance on which wan device to
use to create the route to the remote peer.
This commit adds a 'tunlink' option similar to other tunneling interfaces
such as 6in4, 6rd, gre, etc.
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
Diffstat (limited to 'package/network')
-rw-r--r-- | package/network/utils/wireguard-tools/Makefile | 2 | ||||
-rw-r--r-- | package/network/utils/wireguard-tools/files/wireguard.sh | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/package/network/utils/wireguard-tools/Makefile b/package/network/utils/wireguard-tools/Makefile index 2137a8b4a1..fb7c0b6ee6 100644 --- a/package/network/utils/wireguard-tools/Makefile +++ b/package/network/utils/wireguard-tools/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=wireguard-tools PKG_VERSION:=1.0.20200513 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/ diff --git a/package/network/utils/wireguard-tools/files/wireguard.sh b/package/network/utils/wireguard-tools/files/wireguard.sh index ccac34e45f..63261aea71 100644 --- a/package/network/utils/wireguard-tools/files/wireguard.sh +++ b/package/network/utils/wireguard-tools/files/wireguard.sh @@ -112,6 +112,7 @@ proto_wireguard_setup() { config_get fwmark "${config}" "fwmark" config_get ip6prefix "${config}" "ip6prefix" config_get nohostroute "${config}" "nohostroute" + config_get tunlink "${config}" "tunlink" ip link del dev "${config}" 2>/dev/null ip link add dev "${config}" type wireguard @@ -173,7 +174,7 @@ proto_wireguard_setup() { sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \ while IFS=$'\t ' read -r key address port; do [ -n "${port}" ] || continue - proto_add_host_dependency "${config}" "${address}" + proto_add_host_dependency "${config}" "${address}" "${tunlink}" done fi |