0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Kernel: Before first scan, reject exported routes immediately in preexport

This commit is contained in:
Maria Matejka 2023-12-20 15:36:50 +01:00
parent 3b31138854
commit 6c4be8d1d3

View File

@ -726,6 +726,10 @@ krt_preexport(struct channel *C, rte *e)
if (!krt_capable(e))
return -1;
/* Before first scan we don't touch the routes */
if (!SKIP_BACK(struct krt_proto, p, C->proto)->ready)
return -1;
return 0;
}
@ -747,8 +751,7 @@ krt_rt_notify(struct proto *P, struct channel *ch UNUSED, const net_addr *net,
return;
#endif
if (p->initialized) /* Before first scan we don't touch the routes */
krt_replace_rte(p, net, new, old);
krt_replace_rte(p, net, new, old);
}
static void
@ -813,6 +816,7 @@ krt_feed_end(struct channel *C)
}
p->ready = 1;
bmap_reset(&C->export_reject_map, 16);
krt_scan_timer_kick(p);
}