summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.y b/src/config.y
index 228ba01..8db6efe 100644
--- a/src/config.y
+++ b/src/config.y
@@ -79,6 +79,7 @@
%token TOK_DOWN
%token TOK_ESTABLISH
%token TOK_DISESTABLISH
+%token TOK_VERIFY
%token TOK_PEERS
%token TOK_FROM
%token TOK_LOG
@@ -167,6 +168,7 @@ statement: peer_group_statement
| TOK_ON TOK_DOWN on_down ';'
| TOK_ON TOK_ESTABLISH on_establish ';'
| TOK_ON TOK_DISESTABLISH on_disestablish ';'
+ | TOK_ON TOK_VERIFY on_verify ';'
| TOK_FORWARD forward ';'
;
@@ -356,6 +358,15 @@ on_disestablish: TOK_STRING {
}
;
+on_verify: TOK_STRING {
+ free(conf->on_verify);
+ free(conf->on_verify_dir);
+
+ conf->on_verify = strdup($1->str);
+ conf->on_verify_dir = get_current_dir_name();
+ }
+ ;
+
peer: TOK_STRING {
fastd_peer_config_new(ctx, conf);
conf->peers->name = strdup($1->str);