[isisd] Fix compiler warnings and allow v4-only compilation
2006-12-08 Hannes Gredler <hannes@gredler.at>
* isis_adjacency.c: (isis_new_adj) Allow NULL snpa argument.
* isis_pdu.c: (various) Update calls to isis_new_adj() to pass
NULL and use default.
* (general) Add forward declarations where required.
Fix up const char *'s.
Allow V4-only compilation.
diff --git a/isisd/isis_route.c b/isisd/isis_route.c
index c8f0aab..1286486 100644
--- a/isisd/isis_route.c
+++ b/isisd/isis_route.c
@@ -631,6 +631,8 @@
if (drnode->info == rnode->info)
drnode->info = NULL;
}
+
+#ifdef HAVE_IPV6
if (rnode->p.family == AF_INET6)
{
drnode = route_node_get (area->route_table6[0], &rnode->p);
@@ -640,6 +642,7 @@
if (drnode->info == rnode->info)
drnode->info = NULL;
}
+#endif
isis_route_delete (&rnode->p, table);
}
@@ -667,8 +670,10 @@
if (family == AF_INET)
table = area->route_table[0];
+#ifdef HAVE_IPV6
else if (family == AF_INET6)
table = area->route_table6[0];
+#endif
for (rnode = route_top (table); rnode; rnode = route_next (rnode))
{
@@ -680,8 +685,10 @@
if (family == AF_INET)
table = area->route_table[1];
+#ifdef HAVE_IPV6
else if (family == AF_INET6)
table = area->route_table6[1];
+#endif
for (rnode = route_top (table); rnode; rnode = route_next (rnode))
{
@@ -719,8 +726,8 @@
isis_route_validate_merge (area, AF_INET);
-#ifdef HAVE_IPV6
validate_ipv6:
+#ifdef HAVE_IPV6
if (area->is_type == IS_LEVEL_1)
{
isis_route_validate_table (area, area->route_table6[0]);