mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-23 02:01:55 +00:00
Static: Unlock IGP tables on cleanup to avoid problems with hostentry unlocking
This commit is contained in:
parent
4b9d12708e
commit
c06ce7090f
@ -4797,10 +4797,7 @@ hostentry_tmp_unlock(resource *r)
|
|||||||
{
|
{
|
||||||
struct hostentry_tmp_lock *l = SKIP_BACK(struct hostentry_tmp_lock, r, r);
|
struct hostentry_tmp_lock *l = SKIP_BACK(struct hostentry_tmp_lock, r, r);
|
||||||
RT_LOCKED(l->tab, tab)
|
RT_LOCKED(l->tab, tab)
|
||||||
{
|
|
||||||
l->he->uc--;
|
l->he->uc--;
|
||||||
rt_unlock_table(tab);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -4845,7 +4842,6 @@ rt_get_hostentry(struct rtable_private *tab, ip_addr a, ip_addr ll, rtable *dep)
|
|||||||
l->he = he;
|
l->he = he;
|
||||||
l->tab = RT_PUB(tab);
|
l->tab = RT_PUB(tab);
|
||||||
l->he->uc++;
|
l->he->uc++;
|
||||||
rt_lock_table(tab);
|
|
||||||
|
|
||||||
return he;
|
return he;
|
||||||
}
|
}
|
||||||
|
@ -564,13 +564,19 @@ static_shutdown(struct proto *P)
|
|||||||
WALK_LIST(r, cf->routes)
|
WALK_LIST(r, cf->routes)
|
||||||
static_reset_rte(p, r);
|
static_reset_rte(p, r);
|
||||||
|
|
||||||
|
return PS_DOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
static_cleanup(struct proto *P)
|
||||||
|
{
|
||||||
|
struct static_proto *p = (void *) P;
|
||||||
|
|
||||||
if (p->igp_table_ip4)
|
if (p->igp_table_ip4)
|
||||||
rt_unlock_table(p->igp_table_ip4);
|
rt_unlock_table(p->igp_table_ip4);
|
||||||
|
|
||||||
if (p->igp_table_ip6)
|
if (p->igp_table_ip6)
|
||||||
rt_unlock_table(p->igp_table_ip6);
|
rt_unlock_table(p->igp_table_ip6);
|
||||||
|
|
||||||
return PS_DOWN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -835,6 +841,7 @@ struct protocol proto_static = {
|
|||||||
.dump = static_dump,
|
.dump = static_dump,
|
||||||
.start = static_start,
|
.start = static_start,
|
||||||
.shutdown = static_shutdown,
|
.shutdown = static_shutdown,
|
||||||
|
.cleanup = static_cleanup,
|
||||||
.reconfigure = static_reconfigure,
|
.reconfigure = static_reconfigure,
|
||||||
.copy_config = static_copy_config,
|
.copy_config = static_copy_config,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user