summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-02-26 01:02:35 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-02-26 01:02:35 +0100
commit4ab4858d5473c816cc526b296ae9da6c6956219d (patch)
tree67ac9253e6aa74a68699aa2a9e8e43d89e14c088 /src/config.y
parent87b9b80a55d3567e76fc86d3abc7f3cfd6d92e6f (diff)
downloadfastd-4ab4858d5473c816cc526b296ae9da6c6956219d.tar
fastd-4ab4858d5473c816cc526b296ae9da6c6956219d.zip
Experimental support for accepting connections from unknown peers
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);