vcl: fix cfg parser handling of empty lines 10/34210/3
authorFlorin Coras <fcoras@cisco.com>
Fri, 22 Oct 2021 17:56:54 +0000 (10:56 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 22 Oct 2021 17:53:30 +0000 (17:53 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibef04947c3a2f4e700233157d581ed54558b51ed

src/vcl/vcl_cfg.c

index 1d8407b..2ac9edd 100644 (file)
@@ -252,6 +252,8 @@ vppcom_cfg_read_file (char *conf_fname)
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {
+      /* skip empty newlines as they confuse unformat_line_input */
+      unformat_skip_white_space (input);
       (void) unformat_user (input, unformat_line_input, line_input);
       unformat_skip_white_space (line_input);