]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: fix loss of packets after circuit is brought up
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 24 Nov 2016 23:28:03 +0000 (21:28 -0200)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 25 Nov 2016 00:56:59 +0000 (19:56 -0500)
The last parameter of THREAD_TIMER_ON() is the timeout, and we were
using circuit->fd for that. So, when a circuit was brought up, isisd
would miss all received packets on this circuit for quite a few seconds,
slowing down the convergence process.

To fix this, use the same logic we use in isis_receive() to calculate
this timeout.

This bug doesn't happen on Linux, which uses a different method to read
packets from the network.

Fixes the following ANVL tests on FreeBSD: ISIS-17.1, ISIS-18.6 (and
probably others too).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
isisd/isis_circuit.c

index c2b7ec75074ebe661530edfd49bc3451e6b7fa93..0332023f34a30a29282fd66a5a052e71fdd5887e 100644 (file)
@@ -720,8 +720,8 @@ isis_circuit_up (struct isis_circuit *circuit)
   THREAD_READ_ON (master, circuit->t_read, isis_receive, circuit,
                   circuit->fd);
 #else
-  THREAD_TIMER_ON (master, circuit->t_read, isis_receive, circuit,
-                   circuit->fd);
+  THREAD_TIMER_MSEC_ON (master, circuit->t_read, isis_receive, circuit,
+                       listcount (circuit->area->circuit_list) * 100);
 #endif
 
   circuit->lsp_queue = list_new ();