summaryrefslogtreecommitdiff
path: root/sysdep/linux
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-12-19 16:34:35 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-12-19 16:34:35 +0100
commitcc75b3e1dc4a7440479d6f4d73e7e1b9ba65332f (patch)
tree9401f2da909192332ee64ea344e762e055c5f4de /sysdep/linux
parent90a9c97e38e3769b400b434723516213eccb3ab0 (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/linux')
-rw-r--r--sysdep/linux/netlink.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index 4714263a..25c078c1 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -1399,7 +1399,7 @@ nl_replace_rte(struct krt_proto *p, rte *e)
void
-krt_replace_rte(struct krt_proto *p, net *n, rte *new, rte *old)
+krt_replace_rte(struct krt_proto *p, net *n UNUSED, rte *new, rte *old)
{
int err = 0;
@@ -1428,10 +1428,13 @@ krt_replace_rte(struct krt_proto *p, net *n, rte *new, rte *old)
err = nl_add_rte(p, 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);
+ }
}
static int