summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-11-05 18:26:55 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-11-05 18:26:55 +0100
commitf631c10660c7c0bcdbf793bb1588670fb9ea82e6 (patch)
tree280d32d74c48bfde96cc3510df51e50a5609fa31 /src/config.y
parent0c2f5da1650a295c29001e50384ec2f605055aed (diff)
downloadfastd-f631c10660c7c0bcdbf793bb1588670fb9ea82e6.tar
fastd-f631c10660c7c0bcdbf793bb1588670fb9ea82e6.zip
Implement peer groups
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/config.y b/src/config.y
index 5bf374e..e3c8f82 100644
--- a/src/config.y
+++ b/src/config.y
@@ -99,6 +99,7 @@
%token TOK_CRYPTO
%token TOK_USE
%token TOK_DEFAULT
+%token TOK_GROUP
%token <addr4> TOK_ADDR4
%token <addr6> TOK_ADDR6
@@ -150,6 +151,7 @@ statement: TOK_LOG log ';'
| TOK_ON TOK_ESTABLISH on_establish ';'
| TOK_ON TOK_DISESTABLISH on_disestablish ';'
| TOK_PEER peer '{' peer_conf '}'
+ | TOK_PEER TOK_GROUP peer_group '{' config '}' peer_group_after
| TOK_FORWARD forward ';'
| TOK_INCLUDE include ';'
;
@@ -363,6 +365,17 @@ peer_include: TOK_STRING {
;
+peer_group: TOK_STRING {
+ fastd_config_peer_group_push(ctx, conf, $1->str);
+ }
+ ;
+
+peer_group_after:
+ {
+ fastd_config_peer_group_pop(ctx, conf);
+ }
+ ;
+
forward: boolean { conf->forward = $1; }
;