]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: The ip header dump is crazy long and useless
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 7 Nov 2019 01:17:29 +0000 (20:17 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 19 Nov 2019 12:47:19 +0000 (07:47 -0500)
Turning on packet debugs and seeing a header dump that is 11
lines long is useless

2019/11/07 01:07:05.941798 OSPF: ip_v 4
2019/11/07 01:07:05.941806 OSPF: ip_hl 5
2019/11/07 01:07:05.941813 OSPF: ip_tos 192
2019/11/07 01:07:05.941821 OSPF: ip_len 68
2019/11/07 01:07:05.941831 OSPF: ip_id 48576
2019/11/07 01:07:05.941838 OSPF: ip_off 0
2019/11/07 01:07:05.941845 OSPF: ip_ttl 1
2019/11/07 01:07:05.941857 OSPF: ip_p 89
2019/11/07 01:07:05.941865 OSPF: ip_sum 0xcf33
2019/11/07 01:07:05.941873 OSPF: ip_src 200.254.30.14
2019/11/07 01:07:05.941882 OSPF: ip_dst 224.0.0.5

We already have this debugged, it's not going to change and the
end developer can stick this back in if needed by hand to debug
something that is not working properly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd/ospf_dump.c
ospfd/ospf_dump.h
ospfd/ospf_packet.c

index f74d9733ee7ee07e22b73f85d3cf313189c62c13..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];
index 09c1811c3c57eecaac284ac54fd76c9147cfd049..6b2ebb125a76d6807b8a8fa186aa9a94a9de87ae 100644 (file)
@@ -133,7 +133,6 @@ extern const char *ospf_if_name_string(struct ospf_interface *);
 extern void ospf_nbr_state_message(struct ospf_neighbor *, char *, size_t);
 extern const char *ospf_timer_dump(struct thread *, char *, size_t);
 extern const char *ospf_timeval_dump(struct timeval *, char *, size_t);
-extern void ospf_ip_header_dump(struct ip *);
 extern void ospf_packet_dump(struct stream *);
 extern void ospf_debug_init(void);
 
index a9067e011958871b82cfc1f143576035a528273f..7415c0316a65c1df2be4ecdc2eb78a985c4fa70a 100644 (file)
@@ -614,13 +614,6 @@ static void ospf_write_frags(int fd, struct ospf_packet *op, struct ip *iph,
                                "ospf_write_frags: sent id %d, off %d, len %d to %s\n",
                                iph->ip_id, iph->ip_off, iph->ip_len,
                                inet_ntoa(iph->ip_dst));
-                       if (IS_DEBUG_OSPF_PACKET(type - 1, DETAIL)) {
-                               zlog_debug(
-                                       "-----------------IP Header Dump----------------------");
-                               ospf_ip_header_dump(iph);
-                               zlog_debug(
-                                       "-----------------------------------------------------");
-                       }
                }
 
                iph->ip_off += offset;
@@ -824,7 +817,6 @@ static int ospf_write(struct thread *thread)
                        if (IS_DEBUG_OSPF_PACKET(type - 1, DETAIL)) {
                                zlog_debug(
                                        "-----------------------------------------------------");
-                               ospf_ip_header_dump(&iph);
                                stream_set_getp(op->s, 0);
                                ospf_packet_dump(op->s);
                        }
@@ -2996,10 +2988,6 @@ int ospf_read(struct thread *thread)
                }
        }
 
-       /* IP Header dump. */
-       if (IS_DEBUG_OSPF_PACKET(0, RECV))
-               ospf_ip_header_dump(iph);
-
        /* Self-originated packet should be discarded silently. */
        if (ospf_if_lookup_by_local_addr(ospf, NULL, iph->ip_src)) {
                if (IS_DEBUG_OSPF_PACKET(0, RECV)) {