Moved sanity check of protocol state during annoucements to rte_announce.
This commit is contained in:
parent
f4aabcee62
commit
0a2e9d9f56
2 changed files with 5 additions and 4 deletions
|
@ -112,9 +112,12 @@ rte_announce(net *net, rte *new, rte *old)
|
||||||
struct proto *p;
|
struct proto *p;
|
||||||
|
|
||||||
WALK_LIST(p, proto_list)
|
WALK_LIST(p, proto_list)
|
||||||
|
{
|
||||||
|
ASSERT(p->core_state == FS_HAPPY);
|
||||||
if (p->rt_notify)
|
if (p->rt_notify)
|
||||||
p->rt_notify(p, net, new, old);
|
p->rt_notify(p, net, new, old);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
rt_feed_baby(struct proto *p)
|
rt_feed_baby(struct proto *p)
|
||||||
|
|
|
@ -115,8 +115,6 @@ krt_add_route(rte *new)
|
||||||
void
|
void
|
||||||
krt_set_notify(struct proto *x, net *net, rte *new, rte *old)
|
krt_set_notify(struct proto *x, net *net, rte *new, rte *old)
|
||||||
{
|
{
|
||||||
if (x->proto_state != PS_UP)
|
|
||||||
bug("FIXME: krt_set_notify called for downed protocol");
|
|
||||||
if (old)
|
if (old)
|
||||||
krt_remove_route(old);
|
krt_remove_route(old);
|
||||||
if (new)
|
if (new)
|
||||||
|
|
Loading…
Reference in a new issue