]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed undefined attribute handling
authorMaria Matejka <mq@ucw.cz>
Sun, 26 Jun 2022 12:48:55 +0000 (14:48 +0200)
committerMaria Matejka <mq@ucw.cz>
Mon, 27 Jun 2022 10:32:47 +0000 (12:32 +0200)
nest/rt-attr.c

index 35f852749f5c4bc11227015e8d110f9dd2498f2d..ed3aaf01288a5df4aecb5cd62b3c8edc446202f1 100644 (file)
@@ -727,7 +727,7 @@ ea_do_prune(ea_list *e)
 
       /* Now s0 is the most recent version, s[-1] the oldest one */
       /* Drop undefs unless this is a true overlay */
-      if (s0->undef && !e->next)
+      if (s0->undef && (s[-1].undef || !e->next))
        continue;
 
       /* Copy the newest version to destination */
@@ -1081,7 +1081,7 @@ ea_show(struct cli *c, const eattr *e)
   *pos++ = ' ';
 
   if (e->undef)
-    bsprintf(pos, "undefined (should not happen)");
+    return;
   else if (cls->format)
     cls->format(e, buf, end - buf);
   else