mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Kernel: when channel traces, we have to trace the final result
Otherwise it looks like we are sending too much traffic to netlink every other while, which is not true. Now we can disambiguate between in-kernel updates and ignored routes.
This commit is contained in:
parent
0a2f92ad20
commit
ab74652f96
@ -672,7 +672,7 @@ krt_preexport(struct channel *C, rte *e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
krt_rt_notify(struct proto *P, struct channel *ch UNUSED, const net_addr *net,
|
krt_rt_notify(struct proto *P, struct channel *ch, const net_addr *net,
|
||||||
rte *new, const rte *old)
|
rte *new, const rte *old)
|
||||||
{
|
{
|
||||||
struct krt_proto *p = (struct krt_proto *) P;
|
struct krt_proto *p = (struct krt_proto *) P;
|
||||||
@ -688,13 +688,21 @@ krt_rt_notify(struct proto *P, struct channel *ch UNUSED, const net_addr *net,
|
|||||||
case KPS_IDLE:
|
case KPS_IDLE:
|
||||||
case KPS_PRUNING:
|
case KPS_PRUNING:
|
||||||
if (new && bmap_test(&p->seen_map, new->id))
|
if (new && bmap_test(&p->seen_map, new->id))
|
||||||
/* Already installed and seen in the kernel dump */
|
if (ch->debug & D_ROUTES)
|
||||||
return;
|
{
|
||||||
|
/* Already installed and seen in the kernel dump */
|
||||||
|
log(L_TRACE "%s.%s: %N already in kernel",
|
||||||
|
P->name, ch->name, net);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case KPS_SCANNING:
|
case KPS_SCANNING:
|
||||||
/* Actually replace the route */
|
/* Actually replace the route */
|
||||||
krt_replace_rte(p, net, new, old);
|
krt_replace_rte(p, net, new, old);
|
||||||
|
if (ch->debug & D_ROUTES)
|
||||||
|
log(L_TRACE "%s.%s: %N %s kernel",
|
||||||
|
P->name, ch->name, net, old ? "replaced in" : "added to");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user