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.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 920fdd6baa..1a6e6032b6 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -304,8 +304,8 @@ static void show_nexthop_detail_helper(struct vty *vty,
switch (nexthop->type) {
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
- vty_out(vty, " %s",
- inet_ntoa(nexthop->gate.ipv4));
+ vty_out(vty, " %pI4",
+ &nexthop->gate.ipv4);
if (nexthop->ifindex)
vty_out(vty, ", via %s",
ifindex2ifname(
@@ -508,7 +508,7 @@ static void show_route_nexthop_helper(struct vty *vty,
switch (nexthop->type) {
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
- vty_out(vty, " via %s", inet_ntoa(nexthop->gate.ipv4));
+ vty_out(vty, " via %pI4", &nexthop->gate.ipv4);
if (nexthop->ifindex)
vty_out(vty, ", %s",
ifindex2ifname(nexthop->ifindex,
@@ -636,7 +636,8 @@ static void show_nexthop_json_helper(json_object *json_nexthop,
case NEXTHOP_TYPE_IPV4_IFINDEX:
json_object_string_add(
json_nexthop, "ip",
- inet_ntoa(nexthop->gate.ipv4));
+ inet_ntop(AF_INET, &nexthop->gate.ipv4,
+ buf, sizeof(buf)));
json_object_string_add(json_nexthop, "afi",
"ipv4");
@@ -1768,6 +1769,15 @@ DEFPY (show_route,
return CMD_SUCCESS;
}
+ALIAS_HIDDEN (show_route,
+ show_ro_cmd,
+ "show <ip$ipv4|ipv6$ipv6> ro",
+ SHOW_STR
+ IP_STR
+ IPV6_STR
+ "IP routing table\n");
+
+
DEFPY (show_route_detail,
show_route_detail_cmd,
"show\
@@ -3905,6 +3915,7 @@ void zebra_vty_init(void)
install_element(VIEW_NODE, &show_vrf_cmd);
install_element(VIEW_NODE, &show_vrf_vni_cmd);
install_element(VIEW_NODE, &show_route_cmd);
+ install_element(VIEW_NODE, &show_ro_cmd);
install_element(VIEW_NODE, &show_route_detail_cmd);
install_element(VIEW_NODE, &show_route_summary_cmd);
install_element(VIEW_NODE, &show_ip_nht_cmd);