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/bsd | |
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/bsd')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index e646c414..c2faa23d 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -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) |