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>
This commit is contained in:
Christian Franke 2016-04-03 12:46:27 -03:00 committed by Donald Sharp
parent ba75ed2cf8
commit 233d97e903

View File

@ -1307,6 +1307,8 @@ DEFUN (ip_router_isis,
vty->node = INTERFACE_NODE;
vty->index = ifp;
if (circuit->ipv6_router)
lsp_regenerate_schedule(circuit->area, circuit->is_type, 0);
return rv;
}
@ -1348,10 +1350,10 @@ DEFUN (no_ip_router_isis,
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;
}
@ -1415,6 +1417,8 @@ DEFUN (ipv6_router_isis,
vty->node = INTERFACE_NODE;
vty->index = ifp;
if (circuit->ip_router)
lsp_regenerate_schedule(circuit->area, circuit->is_type, 0);
return rv;
}
@ -1458,6 +1462,8 @@ DEFUN (no_ipv6_router_isis,
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;
}