From f11bc92554bc7e0dbe1493041040ef6ca56635c5 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 31 Mar 2022 13:09:29 +0200 Subject: [PATCH] pim6d: fix mis-printed nexthop Signed-off-by: David Lamparter --- pimd/pim_nht.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index 6845838b65..106bce61db 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -810,13 +810,18 @@ int pim_parse_nexthop_update(ZAPI_CALLBACK_ARGS) continue; } - if (PIM_DEBUG_PIM_NHT) + if (PIM_DEBUG_PIM_NHT) { +#if PIM_IPV == 4 + pim_addr nhaddr = nexthop->gate.ipv4; +#else + pim_addr nhaddr = nexthop->gate.ipv6; +#endif zlog_debug( - "%s: NHT addr %pFX(%s) %d-nhop via %pI4(%s) type %d distance:%u metric:%u ", + "%s: NHT addr %pFX(%s) %d-nhop via %pPA(%s) type %d distance:%u metric:%u ", __func__, &match, pim->vrf->name, i + 1, - &nexthop->gate.ipv4, ifp->name, - nexthop->type, nhr.distance, - nhr.metric); + &nhaddr, ifp->name, nexthop->type, + nhr.distance, nhr.metric); + } if (!ifp->info) { /* -- 2.39.5