diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-12-19 16:34:35 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-12-19 16:34:35 +0100 |
commit | cc75b3e1dc4a7440479d6f4d73e7e1b9ba65332f (patch) | |
tree | 9401f2da909192332ee64ea344e762e055c5f4de /sysdep/unix/krt.c | |
parent | 90a9c97e38e3769b400b434723516213eccb3ab0 (diff) |
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.
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r-- | sysdep/unix/krt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 470368e2..84207251 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -677,7 +677,7 @@ krt_got_route(struct krt_proto *p, rte *e) if (!new) verdict = KRF_DELETE; - else if ((net->n.flags & KRF_SYNC_ERROR) || !krt_same_dest(e, new)) + else if (!bmap_test(&p->sync_map, new->id) || !krt_same_dest(e, new)) verdict = KRF_UPDATE; else verdict = KRF_SEEN; @@ -1094,6 +1094,7 @@ krt_start(struct proto *P) default: log(L_ERR "KRT: Tried to start with strange net type: %d", p->p.net_type); return PS_START; break; } + bmap_init(&p->sync_map, p->p.pool, 1024); add_tail(&krt_proto_list, &p->krt_node); #ifdef KRT_ALLOW_LEARN @@ -1133,6 +1134,7 @@ krt_shutdown(struct proto *P) krt_sys_shutdown(p); rem_node(&p->krt_node); + bmap_free(&p->sync_map); return PS_DOWN; } |