summaryrefslogtreecommitdiffstats
path: root/ldpd/adjacency.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-12-06 01:45:52 +0100
committerRenato Westphal <renato@opensourcerouting.org>2021-01-09 02:22:11 +0100
commit077d336aa7f543525c03de5a4617a2314c7ca984 (patch)
tree50cb5507a3be86de8db95d0691482c5e004c6550 /ldpd/adjacency.c
parentldpd: detect when route received from zebra hasn't changed (diff)
downloadfrr-077d336aa7f543525c03de5a4617a2314c7ca984.tar.xz
frr-077d336aa7f543525c03de5a4617a2314c7ca984.zip
ldpd: add support for RLFA clients
Add an API that allows IGP client daemons to register/unregister RLFAs with ldpd. IGP daemons need to be able to query the LDP labels needed by RLFAs and monitor label updates that might affect those RLFAs. This is similar to the NHT mechanism used by bgpd to resolve and monitor recursive nexthops. This API is based on the following ZAPI opaque messages: * LDP_RLFA_REGISTER: used by IGP daemons to register an RLFA with ldpd. * LDP_RLFA_UNREGISTER_ALL: used by IGP daemons to unregister all of their RLFAs with ldpd. * LDP_RLFA_LABELS: used by ldpd to send RLFA labels to the registered clients. For each RLFA, ldpd needs to return the following labels: * Outer label(s): the labels advertised by the adjacent routers to reach the PQ node; * Inner label: the label advertised by the PQ node to reach the RLFA destination. For the inner label, ldpd automatically establishes a targeted neighborship with the PQ node if one doesn't already exist. For that to work, the PQ node needs to be configured to accept targeted hello messages. If that doesn't happen, ldpd doesn't send a response to the IGP client daemon which in turn won't be able to activate the previously computed RLFA. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/adjacency.c')
-rw-r--r--ldpd/adjacency.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c
index 795a41491..d390e70ad 100644
--- a/ldpd/adjacency.c
+++ b/ldpd/adjacency.c
@@ -183,7 +183,8 @@ adj_itimer(struct thread *thread)
if (adj->source.type == HELLO_TARGETED) {
if (!(adj->source.target->flags & F_TNBR_CONFIGURED) &&
- adj->source.target->pw_count == 0) {
+ adj->source.target->pw_count == 0 &&
+ adj->source.target->rlfa_count == 0) {
/* remove dynamic targeted neighbor */
tnbr_del(leconf, adj->source.target);
return (0);
@@ -259,7 +260,7 @@ struct tnbr *
tnbr_check(struct ldpd_conf *xconf, struct tnbr *tnbr)
{
if (!(tnbr->flags & (F_TNBR_CONFIGURED|F_TNBR_DYNAMIC)) &&
- tnbr->pw_count == 0) {
+ tnbr->pw_count == 0 && tnbr->rlfa_count == 0) {
tnbr_del(xconf, tnbr);
return (NULL);
}