]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-domain.c
Pointers into packet data should usually be pointers to unsigned 1-byte
[tcpdump] / print-domain.c
index 0e152e8c9499ee49b6047de2c67440f8e498713b..8e8bbecee645416e5bbac4913e1449f9d81aed89 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.89 2004-03-23 19:03:03 fenner Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.90 2005-04-20 20:59:30 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -131,9 +131,10 @@ labellen(const u_char *cp)
        i = *cp;
        if ((i & INDIR_MASK) == EDNS0_MASK) {
                int bitlen, elt;
-
-               if ((elt = (i & ~INDIR_MASK)) != EDNS0_ELT_BITLABEL)
+               if ((elt = (i & ~INDIR_MASK)) != EDNS0_ELT_BITLABEL) {
+                       printf("<ELT %d>", elt);
                        return(-1);
+               }
                if (!TTEST2(*(cp + 1), 1))
                        return(-1);
                if ((bitlen = *(cp + 1)) == 0)