mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-07 15:34:52 +00:00
isisd: fix 'show isis route' and 'show isis fast-reroute summary' errors with vrf
When the VRF does not exist, the command will display results for the 'default' VRF. 1.before the commit: sonic# show vrf vrf Vrf1 id 41 table 1001 sonic# show isis vrf abc route level-1 Area 10: IS-IS L1 IPv4 routing table: Prefix Metric Interface Nexthop Label(s) ------------------------------------------------------- 0.0.0.0/0 5 Ethernet0 10.1.1.2 - 6.6.6.6/32 10 - - - sonic# show isis vrf abc fast-reroute summary level-1 Area 10: IS-IS L1 IPv4 Fast ReRoute summary: Protection \ Priority Critical High Medium Low Total -------------------------------------------------------------------------- Classic LFA 0 0 2 3 5 Remote LFA 0 0 0 0 0 Topology Independent LFA 0 0 0 0 0 ECMP 0 0 0 0 0 Unprotected 0 0 2 2 4 Protection coverage 0.00% 0.00% 50.00% 60.00% 55.56% 2.after the commit: sonic# show vrf vrf Vrf1 id 41 table 1001 sonic# show isis vrf abc route level-1 sonic# show isis vrf abc fast-reroute summary level-1 What I do: Move 'ISIS_FIND_VRF_ARGS(argv, argc, idx, vrf_name, all_vrf);' to the front, otherwise changing 'idx' while searching for other parameters may result in failing to find the vrf parameter. Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
This commit is contained in:
parent
2f84a26634
commit
e2e4894940
@ -3258,6 +3258,7 @@ DEFUN(show_isis_route, show_isis_route_cmd,
|
|||||||
json_object *json = NULL, *json_vrf = NULL;
|
json_object *json = NULL, *json_vrf = NULL;
|
||||||
uint8_t algorithm = SR_ALGORITHM_SPF;
|
uint8_t algorithm = SR_ALGORITHM_SPF;
|
||||||
|
|
||||||
|
ISIS_FIND_VRF_ARGS(argv, argc, idx, vrf_name, all_vrf);
|
||||||
if (argv_find(argv, argc, "level-1", &idx))
|
if (argv_find(argv, argc, "level-1", &idx))
|
||||||
levels = ISIS_LEVEL1;
|
levels = ISIS_LEVEL1;
|
||||||
else if (argv_find(argv, argc, "level-2", &idx))
|
else if (argv_find(argv, argc, "level-2", &idx))
|
||||||
@ -3269,7 +3270,6 @@ DEFUN(show_isis_route, show_isis_route_cmd,
|
|||||||
vty_out(vty, "IS-IS Routing Process not enabled\n");
|
vty_out(vty, "IS-IS Routing Process not enabled\n");
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
ISIS_FIND_VRF_ARGS(argv, argc, idx, vrf_name, all_vrf);
|
|
||||||
|
|
||||||
if (argv_find(argv, argc, "prefix-sid", &idx))
|
if (argv_find(argv, argc, "prefix-sid", &idx))
|
||||||
prefix_sid = true;
|
prefix_sid = true;
|
||||||
@ -3520,6 +3520,7 @@ DEFUN(show_isis_frr_summary, show_isis_frr_summary_cmd,
|
|||||||
bool all_vrf = false;
|
bool all_vrf = false;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
||||||
|
ISIS_FIND_VRF_ARGS(argv, argc, idx, vrf_name, all_vrf);
|
||||||
if (argv_find(argv, argc, "level-1", &idx))
|
if (argv_find(argv, argc, "level-1", &idx))
|
||||||
levels = ISIS_LEVEL1;
|
levels = ISIS_LEVEL1;
|
||||||
else if (argv_find(argv, argc, "level-2", &idx))
|
else if (argv_find(argv, argc, "level-2", &idx))
|
||||||
@ -3531,7 +3532,6 @@ DEFUN(show_isis_frr_summary, show_isis_frr_summary_cmd,
|
|||||||
vty_out(vty, "IS-IS Routing Process not enabled\n");
|
vty_out(vty, "IS-IS Routing Process not enabled\n");
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
ISIS_FIND_VRF_ARGS(argv, argc, idx, vrf_name, all_vrf);
|
|
||||||
|
|
||||||
if (all_vrf) {
|
if (all_vrf) {
|
||||||
for (ALL_LIST_ELEMENTS_RO(im->isis, node, isis))
|
for (ALL_LIST_ELEMENTS_RO(im->isis, node, isis))
|
||||||
|
Loading…
Reference in New Issue
Block a user