summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_area.c
diff options
context:
space:
mode:
authorJon <jonirucoeith@gmail.com>2009-02-12 02:22:03 +0100
committerPaul Jakma <paul@quagga.net>2009-06-18 21:18:26 +0200
commit86f9e5a7f3a80d6df13a9750d2148693daa14c8d (patch)
tree6cdcdb8954556cd4c5b6bc7dce900746e59b1ddd /ospf6d/ospf6_area.c
parent[ospfd] Fix OSPF route refcount leak (diff)
downloadfrr-86f9e5a7f3a80d6df13a9750d2148693daa14c8d.tar.xz
frr-86f9e5a7f3a80d6df13a9750d2148693daa14c8d.zip
[ospf6d] Fix ospf6d crash if range defined twice
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.
Diffstat (limited to 'ospf6d/ospf6_area.c')
-rw-r--r--ospf6d/ospf6_area.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c
index 3bfc0cae5..3c999bbcc 100644
--- a/ospf6d/ospf6_area.c
+++ b/ospf6d/ospf6_area.c
@@ -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;
}