From: Jon Date: Thu, 12 Feb 2009 01:30:44 +0000 (-0800) Subject: [ospf6d] Fix ospf6d crash if removing interface with no area X-Git-Tag: frr-2.0-rc1~2312 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=56abbb886f6ad8dce9dd7d336d010861ca9dd2b9;p=matthieu%2Ffrr.git [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. --- diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 2d4d3caf29..5808428b9f 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",