3 [ -n "$INCLUDE_ONLY" ] ||
{
5 .
/lib
/functions
/network.sh
14 local tunlink ifid mtu zone multicast
15 json_get_vars tunlink ifid mtu zone multicast
17 [ -z "$tunlink" ] && {
18 proto_notify_error
"$cfg" NO_TUNLINK
19 proto_block_restart
"$cfg"
24 proto_notify_error
"$cfg" NO_IFID
25 proto_block_restart
"$cfg"
29 ( proto_add_host_dependency
"$cfg" '' "$tunlink" )
31 proto_init_update
"$cfg" 1
34 json_add_string mode
"$mode"
35 json_add_int mtu
"${mtu:-1280}"
37 json_add_string link
"$tunlink"
39 json_add_boolean multicast
"${multicast:-1}"
41 json_add_object
'data'
42 [ -n "$ifid" ] && json_add_int ifid
"$ifid"
48 [ -n "$zone" ] && json_add_string zone
"$zone"
51 proto_send_update
"$cfg"
54 proto_xfrm_teardown
() {
58 proto_xfrm_init_config
() {
62 proto_config_add_int
"mtu"
63 proto_config_add_string
"tunlink"
64 proto_config_add_string
"zone"
65 proto_config_add_int
"ifid"
66 proto_config_add_boolean
"multicast"
70 [ -n "$INCLUDE_ONLY" ] ||
{
71 [ -d /sys
/module
/xfrm_interface
] && add_protocol xfrm