summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-07-19 18:29:30 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-07-19 18:29:30 +0200
commitca648e7a3b76d71817b38d5bc7d765fc994f40ab (patch)
tree9f737855220c1f5a978d5207ddebe73a9c8ba93a /src/config.y
parent1812a63c043b219277441bae1f36a99a5b7b5899 (diff)
downloadfastd-ca648e7a3b76d71817b38d5bc7d765fc994f40ab.tar
fastd-ca648e7a3b76d71817b38d5bc7d765fc994f40ab.zip
Generalize float attribute, deprecate old float syntax
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/config.y b/src/config.y
index 500e18e..97d2f97 100644
--- a/src/config.y
+++ b/src/config.y
@@ -391,8 +391,9 @@ peer_conf: peer_conf peer_statement
;
peer_statement: TOK_REMOTE peer_remote ';'
+ | TOK_FLOAT peer_float ';'
| TOK_KEY peer_key ';'
- | TOK_INCLUDE peer_include ';'
+ | TOK_INCLUDE peer_include ';'
;
peer_remote: TOK_ADDR4 port {
@@ -419,7 +420,12 @@ peer_remote: TOK_ADDR4 port {
conf->peers->hostname = strdup($2->str);
conf->peers->address.sa.sa_family = $1;
conf->peers->address.in.sin_port = htons($3);
- conf->peers->dynamic_float = $4;
+ conf->peers->floating = conf->peers->dynamic_float_deprecated = $4;
+ }
+ ;
+
+peer_float: boolean {
+ conf->peers->floating = $1;
}
;