]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: Use %pI4 in some places 8499/head
authorDonald Sharp <sharpd@nvidia.com>
Sat, 17 Apr 2021 23:46:58 +0000 (19:46 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 4 May 2021 13:06:14 +0000 (09:06 -0400)
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
ospfd/ospf_asbr.c

index ce35e82a14f5ec288d69f4b1ea4ca7ff96b1066d..b022133dcd011bacc1a2ce03d981a16962c6bbb4 100644 (file)
@@ -113,7 +113,6 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
        struct external_info *new;
        struct route_node *rn;
        struct ospf_external *ext;
-       char inetbuf[INET6_BUFSIZ];
 
        ext = ospf_external_lookup(ospf, type, instance);
        if (!ext)
@@ -130,13 +129,11 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
                        return NULL; /* NULL => no LSA to refresh */
                }
 
-               inet_ntop(AF_INET, (void *)&nexthop.s_addr, inetbuf,
-                         sizeof(inetbuf));
                if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
                        zlog_debug(
-                               "Redistribute[%s][%d][%u]: %pFX discarding old info with NH %s.",
+                               "Redistribute[%s][%d][%u]: %pFX discarding old info with NH %pI4.",
                                ospf_redist_string(type), instance,
-                               ospf->vrf_id, &p, inetbuf);
+                               ospf->vrf_id, &p, &nexthop.s_addr);
                XFREE(MTYPE_OSPF_EXTERNAL_INFO, rn->info);
        }
 
@@ -154,12 +151,10 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
                rn->info = new;
 
        if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
-               inet_ntop(AF_INET, (void *)&nexthop.s_addr, inetbuf,
-                         sizeof(inetbuf));
                zlog_debug(
-                       "Redistribute[%s][%u]: %pFX external info created, with NH %s",
-                       ospf_redist_string(type), ospf->vrf_id,
-                       &p, inetbuf);
+                       "Redistribute[%s][%u]: %pFX external info created, with NH %pI4",
+                       ospf_redist_string(type), ospf->vrf_id, &p,
+                       &nexthop.s_addr);
        }
        return new;
 }