isisd: make sure that all interface addresses are advertised
If the following configuration commands are run interactively in
succession, the ipv6 addresses of this interface won't be advertised
in the router's LSP immediately:
# interface eth0
# ip router isis test
# ipv6 router isis test
This is because the ipv6 router command won't trigger a state change
for the interface and therefore, it won't trigger a regeneration of
the LSPs.
The same thing happens if IPv4 is enabled after IPv6, or for the cases
where IPv4 is disabled and IPv6 stays enabled or vice-versa.
Fix this by explicitly calling lsp_regenerate_schedule for the cases
where it won't be called implicitly.
Signed-off-by: Christian Franke <nobody@nowhere.ws>
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 01a9d1e..b493609 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -1298,6 +1298,8 @@
vty->node = INTERFACE_NODE;
vty->index = ifp;
+ if (circuit->ipv6_router)
+ lsp_regenerate_schedule(circuit->area, circuit->is_type, 0);
return rv;
}
@@ -1339,10 +1341,10 @@
circuit->ip_router = 0;
area->ip_circuits--;
-#ifdef HAVE_IPV6
if (circuit->ipv6_router == 0)
-#endif
isis_csm_state_change (ISIS_DISABLE, circuit, area);
+ else
+ lsp_regenerate_schedule(area, circuit->is_type, 0);
return CMD_SUCCESS;
}
@@ -1406,6 +1408,8 @@
vty->node = INTERFACE_NODE;
vty->index = ifp;
+ if (circuit->ip_router)
+ lsp_regenerate_schedule(circuit->area, circuit->is_type, 0);
return rv;
}
@@ -1449,6 +1453,8 @@
area->ipv6_circuits--;
if (circuit->ip_router == 0)
isis_csm_state_change (ISIS_DISABLE, circuit, area);
+ else
+ lsp_regenerate_schedule(area, circuit->is_type, 0);
return CMD_SUCCESS;
}