diff options
author | Jon <jonirucoeith@gmail.com> | 2009-02-11 17:30:44 -0800 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-06-18 20:18:26 +0100 |
commit | 56abbb886f6ad8dce9dd7d336d010861ca9dd2b9 (patch) | |
tree | 0f59dd6d66e5c1647c4d2ffc0a270fbe0cb000f3 | |
parent | 597fa7c185e34aac7bc1df22263e9414bccd9a9f (diff) |
[ospf6d] Fix ospf6d crash if removing interface with no area
ospf6d will crash if attempting to remove interface when no areas have been
defined Check if any areas have been defined. Should prevent use of empty
pointer.
-rw-r--r-- | ospf6d/ospf6_top.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 2d4d3caf..5808428b 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -403,6 +403,13 @@ DEFUN (no_ospf6_interface_area, return CMD_SUCCESS; } + /* Verify Area */ + if (oi->area == NULL) + { + vty_out (vty, "No such Area-ID: %s%s", argv[1], VNL); + return CMD_SUCCESS; + } + if (oi->area->area_id != area_id) { vty_out (vty, "Wrong Area-ID: %s is attached to area %s%s", |