]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Kernel: Do not check templates
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 7 Jan 2021 00:56:00 +0000 (01:56 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 7 Jan 2021 00:56:00 +0000 (01:56 +0100)
So one can define kernel protocol template without channels.
For other protocols, it is either irrelevant or already done.

Thanks to Clemens Schrimpe for the bugreport.

sysdep/unix/krt.c

index cccee456b3b344476025b271b362c6d6cbc44297..c00c660db6ec1ea2f43b0737614681063d2ac9cd 100644 (file)
@@ -1008,6 +1008,10 @@ krt_postconfig(struct proto_config *CF)
 {
   struct krt_config *cf = (void *) CF;
 
+  /* Do not check templates at all */
+  if (cf->c.class == SYM_TEMPLATE)
+    return;
+
   if (EMPTY_LIST(CF->channels))
     cf_error("Channel not specified");