From 4d0d9ac3f9640aa082a207cb779e0018ec3013fb Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 7 Jul 2017 16:17:07 +0200 Subject: [PATCH 1/2] wireguard: assume /32 or /128 if no CIDR is given This brings the route_allowed_ips option into parity with the addresses option, which makes these same assumption. The parsing selection is made to be identical between these two settings. Signed-off-by: Jason A. Donenfeld --- net/wireguard/files/wireguard.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/wireguard/files/wireguard.sh b/net/wireguard/files/wireguard.sh index a826688d7..7b18a2e0e 100644 --- a/net/wireguard/files/wireguard.sh +++ b/net/wireguard/files/wireguard.sh @@ -82,9 +82,15 @@ proto_wireguard_setup_peer() { *:*/*) proto_add_ipv6_route "${allowed_ip%%/*}" "${allowed_ip##*/}" ;; - */*) + *.*/*) proto_add_ipv4_route "${allowed_ip%%/*}" "${allowed_ip##*/}" ;; + *:*) + proto_add_ipv6_route "${allowed_ip%%/*}" "128" + ;; + *.*) + proto_add_ipv4_route "${allowed_ip%%/*}" "32" + ;; esac done fi From 132287156d4e72f1421f402af10e9213357993e4 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 7 Jul 2017 16:21:24 +0200 Subject: [PATCH 2/2] wireguard: version bump Signed-off-by: Jason A. Donenfeld --- net/wireguard/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/wireguard/Makefile b/net/wireguard/Makefile index 8c85aab95..e63cd5024 100644 --- a/net/wireguard/Makefile +++ b/net/wireguard/Makefile @@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=wireguard -PKG_VERSION:=0.0.20170629 +PKG_VERSION:=0.0.20170706 PKG_RELEASE:=1 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/ -PKG_HASH:=51c44624f20eaff96780845214f85491c0c7330598633cd180bb2a6547e5d2b2 +PKG_HASH:=5763b9436265421a67f92cb82142042867fc87c573ecc18033d40c1476146c33 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING