From 58f6649de5380dcbc85a320bdf1038f7962c205c Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Thu, 30 Mar 2023 06:27:32 +0800 Subject: [PATCH] BFD: Labeling a manually configured neighbor for tracking For BFD controlled Static routes, the BFD sessions are created to the route next hop. However, in some scenarios, e.g. when the next hop itself does not support BFD, or when it might be more meaningful to create the session to a remote monitoring station, we need more flexible relationship between a static route nexthop and its controlling BFD session. In this patch, a numeric label value can be specified with manually configured BFD neighbors, and a static route nexthop can be configured to track a certain BFD session using that label. The detailed behavior is updated in the user's guide. This feature may also be added to other protocols, but it seems not so meaningful. --- doc/bird.sgml | 23 ++++++++++++-- nest/bfd.h | 5 +-- nest/config.Y | 11 ++++++- proto/bfd/bfd.c | 73 +++++++++++++++++++++++++++++++++++++------ proto/bfd/bfd.h | 1 + proto/bfd/config.Y | 22 +++++++++++-- proto/bgp/bgp.c | 2 +- proto/ospf/neighbor.c | 2 +- proto/rip/rip.c | 2 +- proto/static/config.Y | 8 +++-- proto/static/static.c | 6 ++-- proto/static/static.h | 1 + 12 files changed, 131 insertions(+), 25 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index 5ac32e9e..80aaa24f 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -2198,7 +2198,7 @@ protocol bfd [<name>] { multiplier <num>; passive <switch>; }; - neighbor <ip> [dev "<interface>"] [local <ip>] [multihop <switch>]; + neighbor <ip> [dev "<interface>"] [local <ip>] [multihop <switch>] [label <num>]; } @@ -2233,7 +2233,7 @@ protocol bfd [<name>] { connected sessions. Currently only one such definition (for all multihop sessions) could be used. -