diff options
author | Maria Matejka <mq@ucw.cz> | 2022-09-14 09:59:45 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-09-14 09:59:45 +0200 |
commit | 1518970c128e6ab68884a7f49e09e2dc2a5d9fe3 (patch) | |
tree | 37abff70b2edc5fcc34b6f93f75abcbd7bfa335f /sysdep | |
parent | 878eeec12bf020c9e7460040d225a929bbbd2bd2 (diff) |
Revert "Routing tables now have their own loops."
This reverts commit 878eeec12bf020c9e7460040d225a929bbbd2bd2.
These changes have been done in a different way in the other branch of
the future merge.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/krt.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 98c56391..5431bebe 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -427,7 +427,6 @@ krt_got_route(struct krt_proto *p, rte *e, s8 src) #endif /* The rest is for KRT_SRC_BIRD (or KRT_SRC_UNKNOWN) */ - RT_LOCK(p->p.main_channel->table); /* Deleting all routes if flush is requested */ if (p->flush_routes) goto delete; @@ -436,7 +435,7 @@ krt_got_route(struct krt_proto *p, rte *e, s8 src) if (!p->ready) goto ignore; - net *net = net_find(RT_PRIV(p->p.main_channel->table), e->net); + net *net = net_find(p->p.main_channel->table, e->net); if (!net || !krt_is_installed(p, net)) goto delete; @@ -482,7 +481,6 @@ delete: goto done; done: - RT_UNLOCK(p->p.main_channel->table); lp_flush(krt_filter_lp); } @@ -500,8 +498,7 @@ krt_init_scan(struct krt_proto *p) static void krt_prune(struct krt_proto *p) { - RT_LOCK(p->p.main_channel->table); - rtable_private *t = RT_PRIV(p->p.main_channel->table); + struct rtable *t = p->p.main_channel->table; KRT_TRACE(p, D_EVENTS, "Pruning table %s", t->name); FIB_WALK(&t->fib, net, n) @@ -521,8 +518,6 @@ krt_prune(struct krt_proto *p) } FIB_WALK_END; - RT_UNLOCK(p->p.main_channel->table); - #ifdef KRT_ALLOW_LEARN if (KRT_CF->learn) channel_refresh_end(p->p.main_channel); |