mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 03:27:39 +00:00
zebra: do not hide distance and metric for kernel routes
There's no reason for not showing this information. Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
This commit is contained in:
parent
1994ae60ee
commit
925c2f8853
@ -589,8 +589,7 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
|
|||||||
if (CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED))
|
if (CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED))
|
||||||
json_object_boolean_true_add(json_route, "selected");
|
json_object_boolean_true_add(json_route, "selected");
|
||||||
|
|
||||||
if (re->type != ZEBRA_ROUTE_CONNECT
|
if (re->type != ZEBRA_ROUTE_CONNECT) {
|
||||||
&& re->type != ZEBRA_ROUTE_KERNEL) {
|
|
||||||
json_object_int_add(json_route, "distance",
|
json_object_int_add(json_route, "distance",
|
||||||
re->distance);
|
re->distance);
|
||||||
json_object_int_add(json_route, "metric", re->metric);
|
json_object_int_add(json_route, "metric", re->metric);
|
||||||
@ -777,8 +776,7 @@ static void vty_show_ip_route(struct vty *vty, struct route_node *rn,
|
|||||||
srcdest_rnode2str(rn, buf, sizeof buf));
|
srcdest_rnode2str(rn, buf, sizeof buf));
|
||||||
|
|
||||||
/* Distance and metric display. */
|
/* Distance and metric display. */
|
||||||
if (re->type != ZEBRA_ROUTE_CONNECT
|
if (re->type != ZEBRA_ROUTE_CONNECT)
|
||||||
&& re->type != ZEBRA_ROUTE_KERNEL)
|
|
||||||
len += vty_out(vty, " [%d/%d]", re->distance,
|
len += vty_out(vty, " [%d/%d]", re->distance,
|
||||||
re->metric);
|
re->metric);
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user