summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon <jonirucoeith@gmail.com>2009-02-11 17:27:06 -0800
committerStephen Hemminger <shemminger@vyatta.com>2009-02-11 17:27:06 -0800
commitec6070848d7dcc8ffb5e57ddf8dd93506c7122c5 (patch)
tree9e86cd03987f95895117828c8d76d2ecc0cb1713
parent832d7f6e9eca04e1083b63f26b5844667deb2e03 (diff)
downloadquagga-ec6070848d7dcc8ffb5e57ddf8dd93506c7122c5.tar.bz2
quagga-ec6070848d7dcc8ffb5e57ddf8dd93506c7122c5.tar.xz
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.
-rw-r--r--ospf6d/ospf6d.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index 7a766c8d..bb091d4f 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -1647,6 +1647,12 @@ DEFUN (show_ipv6_ospf6_border_routers,
ospf6_linkstate_prefix (adv_router, 0, &prefix);
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);
return CMD_SUCCESS;
}