]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fix channel restart sequence
authorMaria Matejka <mq@ucw.cz>
Mon, 10 Feb 2025 11:29:51 +0000 (12:29 +0100)
committerMaria Matejka <mq@ucw.cz>
Wed, 12 Feb 2025 11:40:04 +0000 (12:40 +0100)
If channel goes start -> pause -> start, the original code crashed
but it's a valid sequence for protocol half-restart, going from UP
to START and then back UP.

nest/proto.c

index caf99829b5171bed2a38c15e45537b6616144646..64c41dcc5f86730ee2894176a45fdf8b2bd60cfe 100644 (file)
@@ -956,7 +956,7 @@ channel_set_state(struct channel *c, uint state)
     break;
 
   case CS_UP:
-    ASSERT(cs == CS_DOWN || cs == CS_START);
+    ASSERT(cs == CS_DOWN || cs == CS_START || cs == CS_PAUSE);
 
     if (cs == CS_DOWN)
       channel_do_start(c);