aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorAndré Valentin <avalentin@marcant.net>2019-06-14 13:09:47 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-04 13:09:02 +0200
commit09d37d67ecd48b427a4d20667b839c10a3b26e03 (patch)
tree09734419dc260524130eee5476d891f61155a033 /package
parent37530be1ef7645de40712a281a82f75092f1a7b1 (diff)
downloadupstream-09d37d67ecd48b427a4d20667b839c10a3b26e03.tar.gz
upstream-09d37d67ecd48b427a4d20667b839c10a3b26e03.tar.bz2
upstream-09d37d67ecd48b427a4d20667b839c10a3b26e03.zip
network/config/xfrm: add host-dependency for xfrm interface parent
Add proto_add_host_dependency to add a dependency to the tunlink interface Signed-off-by: André Valentin <avalentin@marcant.net> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase] (cherry picked from commit f6dab9804413139c3bd2647a81652d04baa1e59d)
Diffstat (limited to 'package')
-rw-r--r--package/network/config/xfrm/Makefile2
-rwxr-xr-xpackage/network/config/xfrm/files/xfrm.sh18
2 files changed, 12 insertions, 8 deletions
diff --git a/package/network/config/xfrm/Makefile b/package/network/config/xfrm/Makefile
index efc90cf318..2afbd48a4f 100644
--- a/package/network/config/xfrm/Makefile
+++ b/package/network/config/xfrm/Makefile
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=xfrm
PKG_VERSION:=1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/config/xfrm/files/xfrm.sh b/package/network/config/xfrm/files/xfrm.sh
index df28d38613..1bd1958726 100755
--- a/package/network/config/xfrm/files/xfrm.sh
+++ b/package/network/config/xfrm/files/xfrm.sh
@@ -14,24 +14,28 @@ proto_xfrm_setup() {
local tunlink ifid mtu zone
json_get_vars tunlink ifid mtu zone
- proto_init_update "$cfg" 1
-
- proto_add_tunnel
- json_add_string mode "$mode"
- json_add_int mtu "${mtu:-1280}"
-
[ -z "$tunlink" ] && {
proto_notify_error "$cfg" NO_TUNLINK
proto_block_restart "$cfg"
exit
}
- json_add_string link "$tunlink"
[ -z "$ifid" ] && {
proto_notify_error "$cfg" NO_IFID
proto_block_restart "$cfg"
exit
}
+
+ ( proto_add_host_dependency "$cfg" '' "$tunlink" )
+
+ proto_init_update "$cfg" 1
+
+ proto_add_tunnel
+ json_add_string mode "$mode"
+ json_add_int mtu "${mtu:-1280}"
+
+ json_add_string link "$tunlink"
+
json_add_object 'data'
[ -n "$ifid" ] && json_add_int ifid "$ifid"
json_close_object