]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[ospf6d] Fix ospf6d crash if range defined twice
authorJon <jonirucoeith@gmail.com>
Thu, 12 Feb 2009 01:22:03 +0000 (17:22 -0800)
committerPaul Jakma <paul@quagga.net>
Thu, 18 Jun 2009 19:18:26 +0000 (20:18 +0100)
ospf6d will crash if the same range is defined twice.
There was no check if the same range had previously been defined,
thereby causing a later assert to fail.

ospf6d/ospf6_area.c

index 3bfc0cae5f784c89b95c5005b8181b3d995d1d98..3c999bbcc9824e924e351693ab5ba9c67de15a3f 100644 (file)
@@ -353,6 +353,12 @@ DEFUN (area_range,
         UNSET_FLAG (range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE);
     }
 
+  if (range->rnode)
+    {
+      vty_out (vty, "Range already defined: %s%s", argv[-1], VNL);
+      return CMD_WARNING;
+    }
+
   ospf6_route_add (range, oa->range_table);
   return CMD_SUCCESS;
 }