Browse Source

wireguard: bump to 20180519 from upstream lede-17.01

RISCi_ATOM 5 years ago
parent
commit
0dbb12132c

+ 3 - 2
package/network/services/wireguard/Makefile

@@ -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

+ 6 - 0
package/network/services/wireguard/files/wireguard.sh

@@ -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/' | \

+ 0 - 18
package/network/services/wireguard/patches/100-portability.patch

@@ -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)