diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-02-14 16:14:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-14 16:14:19 +0200 |
| commit | 2fd5e51d4cb0949ce46f131a59f6cc916e3b5240 (patch) | |
| tree | de55a53493be8a1f9bbb1a863a1c5eeba311e5e7 /zebra/zebra_vty.c | |
| parent | 4952f23cee3722ea6d542791e2a4ddfa25e88c76 (diff) | |
| parent | b2ade8e3d2d7200b762b174ed822e88f4801537f (diff) | |
Merge pull request #15332 from donaldsharp/nhg_stuffs
Nhg stuffs
Diffstat (limited to 'zebra/zebra_vty.c')
| -rw-r--r-- | zebra/zebra_vty.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 70b71fe707..da6e2069ff 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1220,7 +1220,12 @@ static void show_nexthop_group_out(struct vty *vty, struct nhg_hash_entry *nhe, json_object_boolean_true_add(json, "valid"); else vty_out(vty, " Valid"); - + if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_REINSTALL)) { + if (json) + json_object_boolean_true_add(json, "reInstall"); + else + vty_out(vty, ", Reinstall"); + } if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED)) { if (json) json_object_boolean_true_add(json, "installed"); @@ -1476,17 +1481,18 @@ static void if_nexthop_group_dump_vty(struct vty *vty, struct interface *ifp) { struct zebra_if *zebra_if = NULL; struct nhg_connected *rb_node_dep = NULL; + bool first = true; zebra_if = ifp->info; - if (!if_nhg_dependents_is_empty(ifp)) { - vty_out(vty, "Interface %s:\n", ifp->name); - - frr_each(nhg_connected_tree, &zebra_if->nhg_dependents, - rb_node_dep) { - vty_out(vty, " "); - show_nexthop_group_out(vty, rb_node_dep->nhe, NULL); + frr_each (nhg_connected_tree, &zebra_if->nhg_dependents, rb_node_dep) { + if (first) { + vty_out(vty, "Interface %s:\n", ifp->name); + first = false; } + + vty_out(vty, " "); + show_nexthop_group_out(vty, rb_node_dep->nhe, NULL); } } |
