]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: make sure that all interface addresses are advertised
authorChristian Franke <nobody@nowhere.ws>
Sun, 3 Apr 2016 15:46:27 +0000 (12:46 -0300)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 6 Apr 2016 12:06:53 +0000 (08:06 -0400)
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>
isisd/isis_circuit.c

index 84b8cec565e8f036f1038d33c0d2cb28762cf101..83d0aa432785215032291e24bd40a3ab64d149c9 100644 (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;
 }