]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed sigsegv for missing proto->rt_notify hook
authorJan Moskyto Matejka <mq@ucw.cz>
Mon, 1 Feb 2016 09:25:31 +0000 (10:25 +0100)
committerJan Moskyto Matejka <mq@ucw.cz>
Mon, 1 Feb 2016 15:01:18 +0000 (16:01 +0100)
If rt_notify is NULL, the export must always stay DOWN.

nest/proto.c

index 08786e5683b9c5a7493b8e705816eea787f06d7b..5b55f9eee07644dd2aff8f3ba60241a4c6cdf304 100644 (file)
@@ -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 */