summaryrefslogtreecommitdiffstats
path: root/doc/examples/openwrt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/openwrt')
-rw-r--r--doc/examples/openwrt/fastd.config10
-rw-r--r--doc/examples/openwrt/fastd.init11
2 files changed, 20 insertions, 1 deletions
diff --git a/doc/examples/openwrt/fastd.config b/doc/examples/openwrt/fastd.config
index 69e3b21..e2c6db6 100644
--- a/doc/examples/openwrt/fastd.config
+++ b/doc/examples/openwrt/fastd.config
@@ -90,6 +90,16 @@ config fastd sample_config
# command to execute before the tunnel interface is set down; $1 will be the interface name (optional)
# option down ''
+ # commands executed by fastd ($INTERFACE can be used for the interface name; optional)
+# option on_pre_up ''
+# option on_up ''
+# option on_down ''
+# option on_post_down ''
+# option on_connect ''
+# option on_establish ''
+# option on_disestablish ''
+# option on_verify ''
+
config peer sample_peer
diff --git a/doc/examples/openwrt/fastd.init b/doc/examples/openwrt/fastd.init
index 325ea12..25a3bb8 100644
--- a/doc/examples/openwrt/fastd.init
+++ b/doc/examples/openwrt/fastd.init
@@ -79,6 +79,14 @@ config_string_hide_ip_addresses='hide ip addresses $(yes_no "$value");'
config_string_hide_mac_addresses='hide mac addresses $(yes_no "$value");'
config_string_secure_handshakes='secure handshakes $(yes_no "$value");'
config_string_packet_mark='packet mark $(guard_value "$value");'
+config_string_on_pre_up='on pre-up $(escape_string "$value");'
+config_string_on_up='on up $(escape_string "$value");'
+config_string_on_down='on down $(escape_string "$value");'
+config_string_on_post_down='on post-down $(escape_string "$value");'
+config_string_on_connect='on connect $(escape_string "$value");'
+config_string_on_establish='on establish $(escape_string "$value");'
+config_string_on_disestablish='on disestablish $(escape_string "$value");'
+config_string_on_verify='on verify $(escape_string "$value");'
config_string_peer='peer $(escape_string "$value") {'
config_string_peer_group='peer group $(escape_string "$value") {'
@@ -234,7 +242,8 @@ generate_config() {
append_options "$s" config \
config config_peer config_peer_dir bind method syslog_level mode interface mtu peer_limit \
- user group status_socket pmtu forward hide_ip_addresses hide_mac_addresses secure_handshakes packet_mark
+ user group status_socket pmtu forward hide_ip_addresses hide_mac_addresses secure_handshakes packet_mark \
+ on_pre_up on_up on_down on_post_down on_connect on_establish on_disestablish on_verify
config_get mode "$s" mode