From: Maria Matejka Date: Wed, 1 Nov 2023 17:24:32 +0000 (+0100) Subject: Nexthop dump fix for unreachables X-Git-Tag: v3.0.0~355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e85f4e890a4b3d910758df36886943e6e335dc08;p=thirdparty%2Fbird.git Nexthop dump fix for unreachables --- diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 71d4d0edd..2e703a0b1 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -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]);