aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-01-13 11:05:46 +0100
committerHans Dedecker <dedeckeh@gmail.com>2018-01-15 09:49:26 +0100
commit4e482309549a4ade1d4b10dc966b45e48ab67d20 (patch)
treef0c49480d806a67ec97850a7f5dc74700b9a5a68 /package/network/ipv6
parente15c63a37574bd15ce3a6636c2f04741ab76f7b9 (diff)
downloadupstream-4e482309549a4ade1d4b10dc966b45e48ab67d20.tar.gz
upstream-4e482309549a4ade1d4b10dc966b45e48ab67d20.tar.bz2
upstream-4e482309549a4ade1d4b10dc966b45e48ab67d20.zip
6rd: pass ipcalc as argument to eval
Instead of grepping for NETWORK after calling ipcalc.sh; pass ipcalc.sh as argument to eval allowing to use $NETWORK to retrieve the IPv4 prefix (ip4prefix). Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network/ipv6')
-rw-r--r--package/network/ipv6/6rd/Makefile2
-rw-r--r--package/network/ipv6/6rd/files/6rd.sh4
2 files changed, 3 insertions, 3 deletions
diff --git a/package/network/ipv6/6rd/Makefile b/package/network/ipv6/6rd/Makefile
index 5086fae69d..47f20414fc 100644
--- a/package/network/ipv6/6rd/Makefile
+++ b/package/network/ipv6/6rd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=6rd
PKG_VERSION:=9
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/ipv6/6rd/files/6rd.sh b/package/network/ipv6/6rd/files/6rd.sh
index 8b34414280..62a20314d9 100644
--- a/package/network/ipv6/6rd/files/6rd.sh
+++ b/package/network/ipv6/6rd/files/6rd.sh
@@ -40,8 +40,8 @@ proto_6rd_setup() {
# Determine the relay prefix.
local ip4prefixlen="${ip4prefixlen:-0}"
- local ip4prefix=$(ipcalc.sh "$ipaddr/$ip4prefixlen" | grep NETWORK)
- ip4prefix="${ip4prefix#NETWORK=}"
+ local ip4prefix
+ eval "$(ipcalc.sh "$ipaddr/$ip4prefixlen")";ip4prefix=$NETWORK
# Determine our IPv6 address.
local ip6subnet=$(6rdcalc "$ip6prefix/$ip6prefixlen" "$ipaddr/$ip4prefixlen")