]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
There may be a symbol with NULL protocol when reconfiguring
authorMaria Matejka <mq@jmq.cz>
Wed, 8 Sep 2021 15:30:09 +0000 (15:30 +0000)
committerMaria Matejka <mq@ucw.cz>
Wed, 13 Oct 2021 17:09:04 +0000 (19:09 +0200)
nest/proto.c

index 31ee1fa1c8d30e24e35b0ca56d5bcc0f40746373..7cfb1555a365581d369476da47e0ea8e20affb6a 100644 (file)
@@ -2243,8 +2243,13 @@ proto_apply_cmd_symbol(const struct symbol *s, void (* cmd)(struct proto *, uint
     return;
   }
 
-  cmd(s->proto->proto, arg, 0);
-  cli_msg(0, "");
+  if (s->proto->proto)
+  {
+    cmd(s->proto->proto, arg, 0);
+    cli_msg(0, "");
+  }
+  else
+    cli_msg(9002, "%s does not exist", s->name);
 }
 
 static void