1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

KRT: Remove KRF_SYNC_ERROR flag

This info is now stored in an internal bmap. Unfortunately, net.flags
is still needed for temporary kernel data.
This commit is contained in:
Ondrej Zajicek (work)
2019-12-19 16:34:35 +01:00
parent 90a9c97e38
commit cc75b3e1dc
6 changed files with 40 additions and 14 deletions

View File

@@ -357,10 +357,13 @@ krt_replace_rte(struct krt_proto *p, net *n, rte *new, rte *old)
if (new)
err = krt_send_route(p, RTM_ADD, new);
if (err < 0)
n->n.flags |= KRF_SYNC_ERROR;
else
n->n.flags &= ~KRF_SYNC_ERROR;
if (new)
{
if (err < 0)
bmap_clear(&p->sync_map, new->id);
else
bmap_set(&p->sync_map, new->id);
}
}
#define SKIP(ARG...) do { DBG("KRT: Ignoring route - " ARG); return; } while(0)