summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_spf.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2021-09-22 14:25:46 +0200
committerGitHub <noreply@github.com>2021-09-22 14:25:46 +0200
commit16c3485e74ff75ab8caa907d6fb06d7173ecbd32 (patch)
tree245e520250c4578242d4dabe4f337d95bcffb97f /ospf6d/ospf6_spf.c
parent86b204303387187e0d195688e54a62b21148f407 (diff)
parentcd8aaf076ea134ce0c4e0154c97f41c355c5df99 (diff)
Merge pull request #9635 from donaldsharp/ospf6_unit
Diffstat (limited to 'ospf6d/ospf6_spf.c')
-rw-r--r--ospf6d/ospf6_spf.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index e4de6ccf91..0e7a2f8fa8 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -440,11 +440,22 @@ void ospf6_spf_table_finish(struct ospf6_route_table *result_table)
}
static const char *const ospf6_spf_reason_str[] = {
- "R+", "R-", "N+", "N-", "L+", "L-", "R*", "N*", "C", "A", "GR"};
-
-void ospf6_spf_reason_string(unsigned int reason, char *buf, int size)
+ "R+", /* OSPF6_SPF_FLAGS_ROUTER_LSA_ADDED */
+ "R-", /* OSPF6_SPF_FLAGS_ROUTER_LSA_REMOVED */
+ "N+", /* OSPF6_SPF_FLAGS_NETWORK_LSA_ADDED */
+ "N-", /* OSPF6_SPF_FLAGS_NETWORK_LSA_REMOVED */
+ "L+", /* OSPF6_SPF_FLAGS_NETWORK_LINK_LSA_ADDED */
+ "L-", /* OSPF6_SPF_FLAGS_NETWORK_LINK_LSA_REMOVED */
+ "R*", /* OSPF6_SPF_FLAGS_ROUTER_LSA_ORIGINATED */
+ "N*", /* OSPF6_SPF_FLAGS_NETWORK_LSA_ORIGINATED */
+ "C", /* OSPF6_SPF_FLAGS_CONFIG_CHANGE */
+ "A", /* OSPF6_SPF_FLAGS_ASBR_STATUS_CHANGE */
+ "GR", /* OSPF6_SPF_FLAGS_GR_FINISH */
+};
+
+void ospf6_spf_reason_string(uint32_t reason, char *buf, int size)
{
- unsigned int bit;
+ uint32_t bit;
int len = 0;
if (!buf)