]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: Fix debug string in rare case
authorDonald Sharp <sharpd@nvidia.com>
Fri, 17 Sep 2021 13:25:54 +0000 (09:25 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 21 Sep 2021 11:54:54 +0000 (07:54 -0400)
When looking up the o_path->ls_prefix if it is not found
the debug statement was using a buf that was never initialized.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospf6d/ospf6_intra.c

index bea8cf0edd3ccd330f038621ef233d89e2a1f939..b31def2d74e28dd9a964d9a5b1eb39a203ceb9bf 100644 (file)
@@ -1495,7 +1495,6 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
        struct listnode *anode, *anext;
        struct listnode *nnode, *rnode, *rnext;
        struct ospf6_nexthop *nh, *rnh;
-       char buf[PREFIX2STR_BUFFER];
        bool route_found = false;
        struct interface *ifp = NULL;
        struct ospf6_lsa *lsa;
@@ -1679,8 +1678,9 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa,
                                if (ls_entry == NULL) {
                                        if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX))
                                                zlog_debug(
-                                                       "%s: ls_prfix %s ls_entry not found.",
-                                                       __func__, buf);
+                                                       "%s: ls_prfix %pFX ls_entry not found.",
+                                                       __func__,
+                                                       &o_path->ls_prefix);
                                        continue;
                                }
                                lsa = ospf6_lsdb_lookup(o_path->origin.type,