summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.y b/src/config.y
index 2bdd5d3..b4bd68b 100644
--- a/src/config.y
+++ b/src/config.y
@@ -74,6 +74,7 @@
%token TOK_BIND
%token TOK_CAPABILITIES
%token TOK_CIPHER
+%token TOK_CONNECT
%token TOK_DEBUG
%token TOK_DEBUG2
%token TOK_DEFAULT
@@ -198,6 +199,7 @@ statement: peer_group_statement
| TOK_ON TOK_UP on_up ';'
| TOK_ON TOK_DOWN on_down ';'
| TOK_ON TOK_POST_DOWN on_post_down ';'
+ | TOK_ON TOK_CONNECT on_connect ';'
| TOK_ON TOK_ESTABLISH on_establish ';'
| TOK_ON TOK_DISESTABLISH on_disestablish ';'
| TOK_ON TOK_VERIFY on_verify ';'
@@ -398,6 +400,11 @@ on_post_down: sync_def_sync TOK_STRING {
}
;
+on_connect: sync_def_async TOK_STRING {
+ fastd_shell_command_set(&conf->on_connect, $2->str, $1);
+ }
+ ;
+
on_establish: sync_def_async TOK_STRING {
fastd_shell_command_set(&conf->on_establish, $2->str, $1);
}