summaryrefslogtreecommitdiff
path: root/proto/pipe/config.Y
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-03-09 13:49:31 +0100
committerMaria Matejka <mq@ucw.cz>2022-03-09 13:49:31 +0100
commit4eeae48214bde9807e8b3312f5a7a5de9f2f1b42 (patch)
treec855923f61954acdc8e9785951e7478df8c65e41 /proto/pipe/config.Y
parent01c9f3d78e596336434fd313e4ed8bdc8db248b6 (diff)
parent56c8f2f03a8631417dc3b730625c08ffca42ead2 (diff)
Merge commit '56c8f2f0' into haugesund
Conflicts: nest/route.h nest/rt-table.c
Diffstat (limited to 'proto/pipe/config.Y')
-rw-r--r--proto/pipe/config.Y7
1 files changed, 6 insertions, 1 deletions
diff --git a/proto/pipe/config.Y b/proto/pipe/config.Y
index 1202c169..c869de9f 100644
--- a/proto/pipe/config.Y
+++ b/proto/pipe/config.Y
@@ -16,7 +16,7 @@ CF_DEFINES
CF_DECLS
-CF_KEYWORDS(PIPE, PEER, TABLE)
+CF_KEYWORDS(PIPE, PEER, TABLE, MAX, GENERATION)
CF_GRAMMAR
@@ -25,6 +25,7 @@ proto: pipe_proto '}' { this_channel = NULL; } ;
pipe_proto_start: proto_start PIPE
{
this_proto = proto_config_new(&proto_pipe, $1);
+ PIPE_CFG->max_generation = 16;
}
proto_name
{
@@ -41,6 +42,10 @@ pipe_proto:
| pipe_proto proto_item ';'
| pipe_proto channel_item_ ';'
| pipe_proto PEER TABLE rtable ';' { PIPE_CFG->peer = $4; }
+ | pipe_proto MAX GENERATION expr ';' {
+ if (($4 < 1) || ($4 > 254)) cf_error("Max generation must be in range 1..254, got %u", $4);
+ PIPE_CFG->max_generation = $4;
+ }
;
CF_CODE