]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Kernel: pause exports also on restart until scan is done
authorMaria Matejka <mq@ucw.cz>
Wed, 12 Feb 2025 11:38:20 +0000 (12:38 +0100)
committerMaria Matejka <mq@ucw.cz>
Tue, 25 Feb 2025 13:38:34 +0000 (14:38 +0100)
To save some time, exports are disabled to kernel when the initial scan
is running. The same should happen when kernel protocol is restarting.

sysdep/unix/krt.c

index 81c073cfd056c38e43913dcd08ed02ef96cdd570..6b4f0521f357d19cd6e33df786d2c2e27714f64a 100644 (file)
@@ -900,6 +900,10 @@ krt_start(struct proto *P)
   bmap_init(&p->seen_map, p->p.pool, 1024);
   add_tail(&krt_proto_list, &p->krt_node);
 
+  /* Disable exports until initial scan is done.
+   * This is needed if somebody happens to restart the kernel protocol. */
+  p->p.rt_notify = NULL;
+
   if (!krt_sys_start(p))
   {
     rem_node(&p->krt_node);