]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[ospf6d] Fix ospf6d crash if removing interface with no area
authorJon <jonirucoeith@gmail.com>
Thu, 12 Feb 2009 01:30:44 +0000 (17:30 -0800)
committerPaul Jakma <paul@quagga.net>
Thu, 18 Jun 2009 19:18:26 +0000 (20:18 +0100)
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.

ospf6d/ospf6_top.c

index 2d4d3caf29b5220d59bf2492f35e2d53da8f2396..5808428b9fc38664c7720c3b4f3a255ec7a83b20 100644 (file)
@@ -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",