0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-17 16:48:43 +00:00

Fixed sigsegv for missing proto->rt_notify hook

If rt_notify is NULL, the export must always stay DOWN.
This commit is contained in:
Jan Moskyto Matejka 2016-02-01 10:25:31 +01:00
parent ade389b326
commit 2a013bb3a0

View File

@ -339,7 +339,7 @@ channel_set_state(struct channel *c, uint state)
if (cs == CS_DOWN) if (cs == CS_DOWN)
channel_do_start(c); channel_do_start(c);
if (!c->gr_wait) if (!c->gr_wait && c->proto->rt_notify)
channel_start_export(c); channel_start_export(c);
break; break;
@ -1089,7 +1089,7 @@ graceful_restart_done(struct timer *t UNUSED)
WALK_LIST(c, p->channels) WALK_LIST(c, p->channels)
{ {
/* Resume postponed export of routes */ /* Resume postponed export of routes */
if ((c->channel_state == CS_UP) && c->gr_wait) if ((c->channel_state == CS_UP) && c->gr_wait && c->proto->rt_notify)
channel_start_export(c); channel_start_export(c);
/* Cleanup */ /* Cleanup */