wireguard: bump to 20180519 from upstream lede-17.01
authorRISCi_ATOM <bob@bobcall.me>
Sat, 26 May 2018 07:46:14 +0000 (03:46 -0400)
committerRISCi_ATOM <bob@bobcall.me>
Sat, 26 May 2018 07:46:14 +0000 (03:46 -0400)
package/network/services/wireguard/Makefile
package/network/services/wireguard/files/wireguard.sh
package/network/services/wireguard/patches/100-portability.patch [deleted file]

index 0cb17e9cc1fd5b3e67343aa19136092c886e59a2..c9ade769a6bc0325334ea7ceb70eadf6cf4c7e36 100644 (file)
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20171221
+PKG_VERSION:=0.0.20180519
 PKG_RELEASE:=1
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=2b97697e9b271ba8836a04120a287b824648124f21d5309170ec51c1f86ac5ed
+PKG_HASH:=8846b3006c3f7e079bb38a4c985ccc2981e259f56c927b4cf47cbc1420e1c462
 
 PKG_LICENSE:=GPL-2.0 Apache-2.0
 PKG_LICENSE_FILES:=COPYING
@@ -60,6 +60,7 @@ include $(INCLUDE_DIR)/package-defaults.mk
 
 # Used by Build/Compile/Default
 MAKE_PATH:=src/tools
+MAKE_VARS += PLATFORM=linux
 
 define Build/Compile
        $(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules
index 7b18a2e0ecdb07cd5df2065661c71fd05fb37f93..96fa7215ffc8d47e2f7934a96ada21eee5a4ed19 100644 (file)
@@ -113,6 +113,7 @@ proto_wireguard_setup() {
   config_get addresses     "${config}" "addresses"
   config_get mtu           "${config}" "mtu"
   config_get fwmark        "${config}" "fwmark"
+  config_get ip6prefix     "${config}" "ip6prefix"
 
   # create interface
   ip link del dev "${config}" 2>/dev/null
@@ -169,6 +170,11 @@ proto_wireguard_setup() {
     esac
   done
 
+  # support ip6 prefixes
+  for prefix in ${ip6prefix}; do
+      proto_add_ipv6_prefix "$prefix"
+  done
+
   # endpoint dependency
   wg show "${config}" endpoints | \
     sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \
diff --git a/package/network/services/wireguard/patches/100-portability.patch b/package/network/services/wireguard/patches/100-portability.patch
deleted file mode 100644 (file)
index b26d51e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-tools: fix portability issue
-
-Check if the compiler defines __linux__, instead of assuming that the
-host OS is the same as the target OS.
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
---- a/src/tools/Makefile
-+++ b/src/tools/Makefile
-@@ -43,7 +43,7 @@ CFLAGS += -DRUNSTATEDIR="\"$(RUNSTATEDIR
- ifeq ($(DEBUG_TOOLS),y)
- CFLAGS += -g
- endif
--ifeq ($(shell uname -s),Linux)
-+ifeq ($(strip $(shell echo __linux__ | $(CC) -E - | grep -v '^\#')),1)
- LIBMNL_CFLAGS := $(shell $(PKG_CONFIG) --cflags libmnl 2>/dev/null)
- LIBMNL_LDLIBS := $(shell $(PKG_CONFIG) --libs libmnl 2>/dev/null || echo -lmnl)
- CFLAGS += $(LIBMNL_CFLAGS)