]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: remove inet_ntop calls in ospf6_write 8930/head
authorPat Ruddy <pat@voltanet.io>
Fri, 25 Jun 2021 09:16:01 +0000 (10:16 +0100)
committerPat Ruddy <pat@voltanet.io>
Sat, 26 Jun 2021 10:16:19 +0000 (11:16 +0100)
substitute pI6 formatter.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
ospf6d/ospf6_message.c

index 7faec0d490531e044eab590e7671cab54cc85947..3ebefb5bc56c9b3dc7c12190d7bb5f3db7e90cce 100644 (file)
@@ -1890,7 +1890,6 @@ static int ospf6_write(struct thread *thread)
        struct ospf6_header *oh;
        struct ospf6_packet *op;
        struct listnode *node;
-       char srcname[64], dstname[64];
        struct iovec iovector[2];
        int pkt_count = 0;
        int len;
@@ -1928,15 +1927,12 @@ static int ospf6_write(struct thread *thread)
                                 "Could not send entire message");
 
                if (IS_OSPF6_DEBUG_MESSAGE(oh->type, SEND_HDR)) {
-                       inet_ntop(AF_INET6, &op->dst, dstname, sizeof(dstname));
-                       inet_ntop(AF_INET6, oi->linklocal_addr, srcname,
-                                 sizeof(srcname));
                        zlog_debug("%s send on %s",
                                   lookup_msg(ospf6_message_type_str, oh->type,
                                              NULL),
                                   oi->interface->name);
-                       zlog_debug("    src: %s", srcname);
-                       zlog_debug("    dst: %s", dstname);
+                       zlog_debug("    src: %pI6", oi->linklocal_addr);
+                       zlog_debug("    dst: %pI6", &op->dst);
                        switch (oh->type) {
                        case OSPF6_MESSAGE_TYPE_HELLO:
                                ospf6_hello_print(oh, OSPF6_ACTION_SEND);