summaryrefslogtreecommitdiff
path: root/pathd/pathd.c
diff options
context:
space:
mode:
authorJavier Garcia <javier.garcia@voltanet.io>2021-04-22 15:52:27 +0200
committerJavier Garcia <javier.garcia@voltanet.io>2021-05-10 12:36:46 +0200
commit75c69d151c8e72e42dfb4b1966428e9cf79cb7f4 (patch)
tree240ecdf1e026387c787fa33fe8a716750525dd1a /pathd/pathd.c
parent34723b2fad066efb410ce121f50c7372c76e61bb (diff)
pathd. TED support . Client to link State - [part 1/4]
- pathd will act as a client to for the configured igp. - pathd must be configured to activate and receive data from igp. !pathd config snippet segment-routing traffic-eng mpls-te on mpls-te import ospfv2 Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
Diffstat (limited to 'pathd/pathd.c')
-rw-r--r--pathd/pathd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/pathd/pathd.c b/pathd/pathd.c
index ae82186315..62785333ec 100644
--- a/pathd/pathd.c
+++ b/pathd/pathd.c
@@ -26,6 +26,7 @@
#include "pathd/pathd.h"
#include "pathd/path_zebra.h"
#include "pathd/path_debug.h"
+#include "pathd/path_ted.h"
#define HOOK_DELAY 3
@@ -329,6 +330,14 @@ srte_policy_best_candidate(const struct srte_policy *policy)
return NULL;
}
+void srte_clean_zebra(void)
+{
+ struct srte_policy *policy, *safe_pol;
+
+ RB_FOREACH_SAFE (policy, srte_policy_head, &srte_policies, safe_pol)
+ srte_policy_del(policy);
+}
+
/**
* Apply changes defined by setting the policies, candidate paths
* and segment lists modification flags NEW, MODIFIED and DELETED.
@@ -1024,6 +1033,12 @@ const char *srte_origin2str(enum srte_protocol_origin origin)
}
}
+void pathd_shutdown(void)
+{
+ path_ted_teardown();
+ srte_clean_zebra();
+}
+
void trigger_pathd_candidate_created(struct srte_candidate *candidate)
{
/* The hook is called asynchronously to let the PCEP module