]> git.puffer.fish Git - mirror/frr.git/commitdiff
pim6d: fix mis-printed nexthop 10940/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 31 Mar 2022 11:09:29 +0000 (13:09 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 4 Apr 2022 12:48:54 +0000 (14:48 +0200)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
pimd/pim_nht.c

index 6845838b65e87f727016d362a431681e770ed245..106bce61dbb720521f830b062029af5962141992 100644 (file)
@@ -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) {
                                /*