From: Christian Franke Date: Sun, 3 Apr 2016 15:46:27 +0000 (-0300) Subject: isisd: make sure that all interface addresses are advertised X-Git-Tag: frr-2.0-rc1~989^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=233d97e903493fa0393a935a75cc895e8dbbdb69;p=mirror%2Ffrr.git 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 --- diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index 84b8cec565..83d0aa4327 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -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; }