]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
CLI: Fix continuation lines after final one
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 26 Nov 2019 15:43:09 +0000 (16:43 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 26 Nov 2019 15:43:09 +0000 (16:43 +0100)
Continuation lines may use short form (with space instead of message
number), but this should not be done when previous line is final.

Thanks to Kenth Eriksson for the bugreport and analysis.

nest/cli.c

index 24962f10794b73e9f5f39659f5c2297740bcbf9c..b54a0d76dc26dcaf5cf07bff0b150058a1237061 100644 (file)
@@ -143,6 +143,7 @@ cli_printf(cli *c, int code, char *msg, ...)
     {
       size = bsprintf(buf, "%04d ", cd);
       errcode = 8000;
+      cd = 0;  /* Final message - no more continuation lines */
     }
 
   c->last_reply = cd;