forked from Mirror/frr
[ospf6d] Fix ospf6d crash in show border routers
ospf6d will crash if this command is executed on a non-border-router. Included test to verify that any routes are defined, preventing empty pointer from being used.
This commit is contained in:
parent
6c19d26a01
commit
597fa7c185
|
@ -1647,6 +1647,12 @@ DEFUN (show_ipv6_ospf6_border_routers,
|
||||||
|
|
||||||
ospf6_linkstate_prefix (adv_router, 0, &prefix);
|
ospf6_linkstate_prefix (adv_router, 0, &prefix);
|
||||||
ro = ospf6_route_lookup (&prefix, ospf6->brouter_table);
|
ro = ospf6_route_lookup (&prefix, ospf6->brouter_table);
|
||||||
|
if (!ro)
|
||||||
|
{
|
||||||
|
vty_out (vty, "No Route found for Router ID: %s%s", argv[0], VNL);
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
ospf6_route_show_detail (vty, ro);
|
ospf6_route_show_detail (vty, ro);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue