From a6f71d37d6a00ac9c2ddeb8a32c0f059229d0c82 Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 10 Aug 2020 13:11:19 -0300 Subject: [PATCH] isisd: don't display summary information of inactive SPF instances This fixes a problem where "show isis summary" could display inconsistent information about the IPv6 dst-src SPT when "ipv6-dstsrc" wasn't explicitly configured. Signed-off-by: Renato Westphal --- isisd/isisd.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/isisd/isisd.c b/isisd/isisd.c index 6f126b7faf..156a32b1be 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1390,17 +1390,28 @@ DEFUN (show_isis_summary, " (not used, IETF SPF delay activated)"); vty_out(vty, "\n"); - vty_out(vty, " IPv4 route computation:\n"); - isis_spf_print(area->spftree[SPFTREE_IPV4][level - 1], - vty); + if (area->ip_circuits) { + vty_out(vty, " IPv4 route computation:\n"); + isis_spf_print( + area->spftree[SPFTREE_IPV4][level - 1], + vty); + } - vty_out(vty, " IPv6 route computation:\n"); - isis_spf_print(area->spftree[SPFTREE_IPV6][level - 1], - vty); + if (area->ipv6_circuits) { + vty_out(vty, " IPv6 route computation:\n"); + isis_spf_print( + area->spftree[SPFTREE_IPV6][level - 1], + vty); + } - vty_out(vty, " IPv6 dst-src route computation:\n"); - isis_spf_print(area->spftree[SPFTREE_DSTSRC][level-1], - vty); + if (area->ipv6_circuits + && isis_area_ipv6_dstsrc_enabled(area)) { + vty_out(vty, + " IPv6 dst-src route computation:\n"); + isis_spf_print(area->spftree[SPFTREE_DSTSRC] + [level - 1], + vty); + } } } vty_out(vty, "\n"); -- 2.39.5