]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nexthop dump fix for unreachables
authorMaria Matejka <mq@ucw.cz>
Wed, 1 Nov 2023 17:24:32 +0000 (18:24 +0100)
committerMaria Matejka <mq@ucw.cz>
Wed, 1 Nov 2023 17:24:32 +0000 (18:24 +0100)
nest/rt-attr.c

index 71d4d0edd8f56c08b9c8907c8ad0e1b4a65d8b88..2e703a0b1641a22b2be1bcebf3a3c4636ab390d1 100644 (file)
@@ -1348,7 +1348,15 @@ nexthop_dump(const struct adata *ad)
 
   debug(":");
 
-  NEXTHOP_WALK(nh, nhad)
+  if (!NEXTHOP_IS_REACHABLE(nhad))
+  {
+    const char *name = rta_dest_name(nhad->dest);
+    if (name)
+      debug(" %s", name);
+    else
+      debug(" D%d", nhad->dest);
+  }
+  else NEXTHOP_WALK(nh, nhad)
     {
       if (ipa_nonzero(nh->gw)) debug(" ->%I", nh->gw);
       if (nh->labels) debug(" L %d", nh->label[0]);