mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 18:59:13 +08:00
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]
This commit is contained in:
parent
62be427067
commit
f6dab98044
@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=xfrm
|
PKG_NAME:=xfrm
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -14,24 +14,28 @@ proto_xfrm_setup() {
|
|||||||
local tunlink ifid mtu zone
|
local tunlink ifid mtu zone
|
||||||
json_get_vars 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" ] && {
|
[ -z "$tunlink" ] && {
|
||||||
proto_notify_error "$cfg" NO_TUNLINK
|
proto_notify_error "$cfg" NO_TUNLINK
|
||||||
proto_block_restart "$cfg"
|
proto_block_restart "$cfg"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
json_add_string link "$tunlink"
|
|
||||||
|
|
||||||
[ -z "$ifid" ] && {
|
[ -z "$ifid" ] && {
|
||||||
proto_notify_error "$cfg" NO_IFID
|
proto_notify_error "$cfg" NO_IFID
|
||||||
proto_block_restart "$cfg"
|
proto_block_restart "$cfg"
|
||||||
exit
|
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'
|
json_add_object 'data'
|
||||||
[ -n "$ifid" ] && json_add_int ifid "$ifid"
|
[ -n "$ifid" ] && json_add_int ifid "$ifid"
|
||||||
json_close_object
|
json_close_object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user