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
# 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
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
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/' | \
+++ /dev/null
-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)