summaryrefslogtreecommitdiff
path: root/proto/bgp/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2020-11-08 15:33:22 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2020-11-08 15:33:22 +0100
commit9d3fc3062b236f51b2c72a4c2c7b068f1946261d (patch)
tree0a24e42caff1ba4eb004fc1831b1c0b00407216f /proto/bgp/config.Y
parentfc1e3211b109400c0e96f889829c9f5145ac7226 (diff)
BFD: Allow per-request session options
BFD session options are configured per interface in BFD protocol. This patch allows to specify them also per-request in protocols requesting sessions (currently limited to BGP).
Diffstat (limited to 'proto/bgp/config.Y')
-rw-r--r--proto/bgp/config.Y5
1 files changed, 3 insertions, 2 deletions
diff --git a/proto/bgp/config.Y b/proto/bgp/config.Y
index 7279560b..dc295645 100644
--- a/proto/bgp/config.Y
+++ b/proto/bgp/config.Y
@@ -190,8 +190,9 @@ bgp_proto:
| bgp_proto LONG LIVED STALE TIME expr ';' { BGP_CFG->llgr_time = $6; }
| bgp_proto TTL SECURITY bool ';' { BGP_CFG->ttl_security = $4; }
| bgp_proto CHECK LINK bool ';' { BGP_CFG->check_link = $4; }
- | bgp_proto BFD bool ';' { BGP_CFG->bfd = $3; cf_check_bfd($3); }
- | bgp_proto BFD GRACEFUL ';' { BGP_CFG->bfd = BGP_BFD_GRACEFUL; cf_check_bfd(1); }
+ | bgp_proto BFD bool ';' { cf_check_bfd($3); BGP_CFG->bfd = $3 ? bfd_new_options() : NULL; }
+ | bgp_proto BFD GRACEFUL ';' { cf_check_bfd(1); struct bfd_options *opts = bfd_new_options(); opts->mode = BGP_BFD_GRACEFUL; BGP_CFG->bfd = opts; }
+ | bgp_proto BFD bfd_opts ';' { BGP_CFG->bfd = $3; cf_check_bfd(1); }
| bgp_proto ENFORCE FIRST AS bool ';' { BGP_CFG->enforce_first_as = $5; }
;