summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-02-01 10:25:31 +0100
committerJan Moskyto Matejka <mq@ucw.cz>2016-02-01 16:01:18 +0100
commit2a013bb3a01174fac3a841fd825ac4f13f3ea84d (patch)
tree0ec9e70502fe6e38d69e4c868df1b7c034f391e7
parentade389b326ddf2caaf08d7d3be8b3a1066ea7c97 (diff)
Fixed sigsegv for missing proto->rt_notify hook
If rt_notify is NULL, the export must always stay DOWN.
-rw-r--r--nest/proto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nest/proto.c b/nest/proto.c
index 08786e56..5b55f9ee 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -339,7 +339,7 @@ channel_set_state(struct channel *c, uint state)
if (cs == CS_DOWN)
channel_do_start(c);
- if (!c->gr_wait)
+ if (!c->gr_wait && c->proto->rt_notify)
channel_start_export(c);
break;
@@ -1089,7 +1089,7 @@ graceful_restart_done(struct timer *t UNUSED)
WALK_LIST(c, p->channels)
{
/* 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);
/* Cleanup */