summaryrefslogtreecommitdiff
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 5742c38e23..3bf20ff42e 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -891,6 +891,9 @@ static void do_show_route_helper(struct vty *vty, struct zebra_vrf *zvrf,
for (rn = route_top(table); rn; rn = srcdest_route_next(rn)) {
dest = rib_dest_from_rnode(rn);
+ if (longer_prefix_p && !prefix_match(longer_prefix_p, &rn->p))
+ continue;
+
RNODE_FOREACH_RE (rn, re) {
if (use_fib && re != dest->selected_fib)
continue;
@@ -898,10 +901,6 @@ static void do_show_route_helper(struct vty *vty, struct zebra_vrf *zvrf,
if (tag && re->tag != tag)
continue;
- if (longer_prefix_p
- && !prefix_match(longer_prefix_p, &rn->p))
- continue;
-
/* This can only be true when the afi is IPv4 */
if (supernets_only) {
addr = ntohl(rn->p.u.prefix4.s_addr);
@@ -1196,6 +1195,7 @@ static void show_nexthop_group_out(struct vty *vty, struct nhg_hash_entry *nhe,
json_object_string_add(json, "uptime", up_str);
json_object_string_add(json, "vrf",
vrf_id_to_name(nhe->vrf_id));
+ json_object_string_add(json, "afi", afi2str(nhe->afi));
} else {
vty_out(vty, "ID: %u (%s)\n", nhe->id,
@@ -1209,7 +1209,8 @@ static void show_nexthop_group_out(struct vty *vty, struct nhg_hash_entry *nhe,
vty_out(vty, "\n");
vty_out(vty, " Uptime: %s\n", up_str);
- vty_out(vty, " VRF: %s\n", vrf_id_to_name(nhe->vrf_id));
+ vty_out(vty, " VRF: %s(%s)\n", vrf_id_to_name(nhe->vrf_id),
+ afi2str(nhe->afi));
}
if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_VALID)) {
@@ -1229,6 +1230,13 @@ static void show_nexthop_group_out(struct vty *vty, struct nhg_hash_entry *nhe,
else
vty_out(vty, ", Installed");
}
+ if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INITIAL_DELAY_INSTALL)) {
+ if (json)
+ json_object_boolean_true_add(json,
+ "initialDelay");
+ else
+ vty_out(vty, ", Initial Delay");
+ }
if (!json)
vty_out(vty, "\n");
}
@@ -3909,7 +3917,7 @@ DEFUN (show_zebra,
out = ttable_dump(table, "\n");
vty_out(vty, "%s\n", out);
- XFREE(MTYPE_TMP, out);
+ XFREE(MTYPE_TMP_TTABLE, out);
ttable_del(table);
vty_out(vty,
@@ -4143,12 +4151,6 @@ DEFUN (zebra_show_routing_tables_summary,
return CMD_SUCCESS;
}
-/* Table configuration write function. */
-static int config_write_table(struct vty *vty)
-{
- return 0;
-}
-
/* IPForwarding configuration write function. */
static int config_write_forwarding(struct vty *vty)
{
@@ -4325,14 +4327,6 @@ static struct cmd_node protocol_node = {
.prompt = "",
.config_write = config_write_protocol,
};
-/* table node for routing tables. */
-static int config_write_table(struct vty *vty);
-static struct cmd_node table_node = {
- .name = "table",
- .node = TABLE_NODE,
- .prompt = "",
- .config_write = config_write_table,
-};
static int config_write_forwarding(struct vty *vty);
static struct cmd_node forwarding_node = {
.name = "forwarding",
@@ -4345,7 +4339,6 @@ static struct cmd_node forwarding_node = {
void zebra_vty_init(void)
{
/* Install configuration write function. */
- install_node(&table_node);
install_node(&forwarding_node);
install_element(VIEW_NODE, &show_ip_forwarding_cmd);