Replace assert with log.
Although it is true unless there is a bug in BIRD, this assert is not needed (code below does not require that assumption), so we should not crash.
This commit is contained in:
parent
024e633c16
commit
ac07aacd2c
1 changed files with 3 additions and 1 deletions
|
@ -515,7 +515,9 @@ static void
|
||||||
proto_fell_down(struct proto *p)
|
proto_fell_down(struct proto *p)
|
||||||
{
|
{
|
||||||
DBG("Protocol %s down\n", p->name);
|
DBG("Protocol %s down\n", p->name);
|
||||||
ASSERT(p->stats.imp_routes == 0);
|
|
||||||
|
if (p->stats.imp_routes != 0)
|
||||||
|
log(L_ERR "Protocol %s is down but still has %d routes", p->name, p->stats.imp_routes);
|
||||||
|
|
||||||
bzero(&p->stats, sizeof(struct proto_stats));
|
bzero(&p->stats, sizeof(struct proto_stats));
|
||||||
rt_unlock_table(p->table);
|
rt_unlock_table(p->table);
|
||||||
|
|
Loading…
Reference in a new issue