[isisd] Bug #437: fix ssert caused by bad list management
2008-01-29 James Carlson <james.d.carlson@sun.com>
* Fix bug #437, assert due to bogus index management
* isis_flags.c: (flags_initialize) new
* (flags_get_index) fix off by one, leading to list assert
on null node data.
(flags_free_index) ditto.
* isisd.c: (isis_area_create) use flags_initialize
(isis_area_destroy) deconfigure circuits when
taking down area.
diff --git a/isisd/isis_flags.h b/isisd/isis_flags.h
index f2421f2..13dd9e1 100644
--- a/isisd/isis_flags.h
+++ b/isisd/isis_flags.h
@@ -28,6 +28,7 @@
* the support will be achived using the newest drafts */
#define ISIS_MAX_CIRCUITS 32 /* = 1024 */ /*FIXME:defined in lsp.h as well */
+void flags_initialize (struct flags *flags);
struct flags *new_flags (int size);
int flags_get_index (struct flags *flags);
void flags_free_index (struct flags *flags, int index);