summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-11-05 22:24:42 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-11-05 22:24:42 +0100
commit8f60a96b84b1f952b0f3073e5df52f024162ef4b (patch)
tree7f4374bf7e0f1d10bc238093b1de9c264692a3f6 /src/config.y
parentf631c10660c7c0bcdbf793bb1588670fb9ea82e6 (diff)
downloadfastd-8f60a96b84b1f952b0f3073e5df52f024162ef4b.tar
fastd-8f60a96b84b1f952b0f3073e5df52f024162ef4b.zip
Implement peer limit constraints
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 e3c8f82..5e3e837 100644
--- a/src/config.y
+++ b/src/config.y
@@ -100,6 +100,7 @@
%token TOK_USE
%token TOK_DEFAULT
%token TOK_GROUP
+%token TOK_LIMIT
%token <addr4> TOK_ADDR4
%token <addr6> TOK_ADDR6
@@ -152,6 +153,7 @@ statement: TOK_LOG log ';'
| TOK_ON TOK_DISESTABLISH on_disestablish ';'
| TOK_PEER peer '{' peer_conf '}'
| TOK_PEER TOK_GROUP peer_group '{' config '}' peer_group_after
+ | TOK_PEER TOK_LIMIT peer_limit ';'
| TOK_FORWARD forward ';'
| TOK_INCLUDE include ';'
;
@@ -376,6 +378,11 @@ peer_group_after:
}
;
+peer_limit: TOK_INTEGER {
+ conf->peer_group->max_connections = $1;
+ }
+ ;
+
forward: boolean { conf->forward = $1; }
;