]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-lwres.c
doc: Actualize README.solaris.md. [skip ci]
[tcpdump] / print-lwres.c
index b8f9b49ae598c3b410de1bfa31032b0b5f54310b..29b49c6e7be843c24866b1a5ae6ccb9a1859ec21 100644 (file)
@@ -29,9 +29,7 @@
 
 /* \summary: BIND9 Lightweight Resolver protocol printer */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -267,7 +265,7 @@ lwres_printaddr(netdissect_options *ndo,
                }
        }
 
-       return ND_BYTES_BETWEEN(p, p0);
+       return ND_BYTES_BETWEEN(p0, p);
 }
 
 void
@@ -548,7 +546,7 @@ lwres_print(netdissect_options *ndo,
                ND_PRINT(" [len: %u != %u]", GET_BE_U_4(np->length),
                          length);
        }
-       if (!unsupported && ND_BYTES_BETWEEN(s, bp) < GET_BE_U_4(np->length))
+       if (!unsupported && ND_BYTES_BETWEEN(bp, s) < GET_BE_U_4(np->length))
                ND_PRINT("[extra]");
        return;