]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add a define to allow noisy ARP debugging.
authorRoy Marples <roy@marples.name>
Sat, 25 Feb 2017 00:54:16 +0000 (00:54 +0000)
committerRoy Marples <roy@marples.name>
Sat, 25 Feb 2017 00:54:16 +0000 (00:54 +0000)
arp.c

diff --git a/arp.c b/arp.c
index ccec9db944f77004bf245e38f4b1e58bcf0e31b8..5188dce0af54c2c576cba27230d84fd37b31fba6 100644 (file)
--- a/arp.c
+++ b/arp.c
@@ -56,6 +56,9 @@
 #define ARP_LEN                                                                      \
        (sizeof(struct arphdr) + (2 * sizeof(uint32_t)) + (2 * HWADDR_LEN))
 
+/* ARP debugging can be quite noisy. Enable this for more noise! */
+//#define      ARP_DEBUG
+
 /* Assert the correct structure size for on wire */
 __CTASSERT(sizeof(struct arphdr) == 8);
 
@@ -145,7 +148,7 @@ arp_packet(struct interface *ifp, uint8_t *data, size_t len)
                        break;
        }
        if (ifn) {
-#if 0
+#ifdef ARP_DEBUG
                logger(ifp->ctx, LOG_DEBUG,
                    "%s: ignoring ARP from self", ifp->name);
 #endif
@@ -161,7 +164,7 @@ arp_packet(struct interface *ifp, uint8_t *data, size_t len)
        if (arm.sip.s_addr == INADDR_ANY &&
            (arm.tha[0] != 0 || memcmp(arm.tha, arm.tha + 1, ar.ar_hln - 1)))
        {
-#if 0
+#ifdef ARP_DEBUG
                char buf[HWADDR_LEN * 3];
 
                logger(ifp->ctx, LOG_DEBUG,