]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_dump.c
Merge pull request #5549 from donaldsharp/automated
[mirror_frr.git] / ospfd / ospf_dump.c
index d8742943c0043022494ac545da87104a1926715b..dffcb930e450ea359c02fd46488405030f6eb3aa 100644 (file)
@@ -501,23 +501,6 @@ static void ospf_packet_ls_ack_dump(struct stream *s, uint16_t length)
        stream_set_getp(s, sp);
 }
 
-/* Expects header to be in host order */
-void ospf_ip_header_dump(struct ip *iph)
-{
-       /* IP Header dump. */
-       zlog_debug("ip_v %d", iph->ip_v);
-       zlog_debug("ip_hl %d", iph->ip_hl);
-       zlog_debug("ip_tos %d", iph->ip_tos);
-       zlog_debug("ip_len %d", iph->ip_len);
-       zlog_debug("ip_id %u", (uint32_t)iph->ip_id);
-       zlog_debug("ip_off %u", (uint32_t)iph->ip_off);
-       zlog_debug("ip_ttl %d", iph->ip_ttl);
-       zlog_debug("ip_p %d", iph->ip_p);
-       zlog_debug("ip_sum 0x%x", (uint32_t)iph->ip_sum);
-       zlog_debug("ip_src %s", inet_ntoa(iph->ip_src));
-       zlog_debug("ip_dst %s", inet_ntoa(iph->ip_dst));
-}
-
 static void ospf_header_dump(struct ospf_header *ospfh)
 {
        char buf[9];
@@ -538,8 +521,7 @@ static void ospf_header_dump(struct ospf_header *ospfh)
        case OSPF_AUTH_NULL:
                break;
        case OSPF_AUTH_SIMPLE:
-               memset(buf, 0, 9);
-               strncpy(buf, (char *)ospfh->u.auth_data, 8);
+               strlcpy(buf, (char *)ospfh->u.auth_data, sizeof(buf));
                zlog_debug("  Simple Password %s", buf);
                break;
        case OSPF_AUTH_CRYPTOGRAPHIC:
@@ -1799,7 +1781,7 @@ static int config_write_debug(struct vty *vty)
 }
 
 /* Initialize debug commands. */
-void debug_init()
+void ospf_debug_init(void)
 {
        install_node(&debug_node, config_write_debug);