]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: fix add an algorithm argument to show isis route 13334/head
authorLouis Scalbert <louis.scalbert@6wind.com>
Tue, 18 Apr 2023 15:35:41 +0000 (17:35 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Thu, 20 Apr 2023 14:23:50 +0000 (16:23 +0200)
"show isis route algorithm ALGO json" display some text output before
printing the JSON one.

Do not print the text output in JSON mode.

Fixes: 0833c25180 ("isisd: add an algorithm argument to show isis route")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
isisd/isis_spf.c

index 732853796aab88b39f08b438381146b15d47c129..466e96b3a2cc3e7161354c966d6958fe91896d20 100644 (file)
@@ -2884,7 +2884,8 @@ static void show_isis_route_common(struct vty *vty, int levels,
                                        spftree = area->spftree[SPFTREE_IPV4]
                                                               [level - 1];
 
-                               isis_print_spftree(vty, spftree);
+                               if (!json)
+                                       isis_print_spftree(vty, spftree);
 
                                isis_print_routes(vty, spftree,
                                                  json ? &json_val : NULL,
@@ -2905,7 +2906,8 @@ static void show_isis_route_common(struct vty *vty, int levels,
                                        spftree = area->spftree[SPFTREE_IPV6]
                                                               [level - 1];
 
-                               isis_print_spftree(vty, spftree);
+                               if (!json)
+                                       isis_print_spftree(vty, spftree);
 
                                isis_print_routes(vty, spftree,
                                                  json ? &json_val : NULL,
@@ -2927,7 +2929,8 @@ static void show_isis_route_common(struct vty *vty, int levels,
                                        spftree = area->spftree[SPFTREE_DSTSRC]
                                                               [level - 1];
 
-                               isis_print_spftree(vty, spftree);
+                               if (!json)
+                                       isis_print_spftree(vty, spftree);
                                isis_print_routes(vty, spftree,
                                                  json ? &json_val : NULL,
                                                  prefix_sid, backup);