From: guy Date: Wed, 20 Apr 2005 20:59:00 +0000 (+0000) Subject: If we get an ELT other than a bit label in labellen(), log it. X-Git-Tag: tcpdump-3.9.1~129 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/ef91556a6ab58495c7f49ecd674c534b0b20df72?ds=sidebyside If we get an ELT other than a bit label in labellen(), log it. --- diff --git a/print-domain.c b/print-domain.c index 0e152e8c..a50e5918 100644 --- a/print-domain.c +++ b/print-domain.c @@ -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.89.2.1 2005-04-20 20:59:00 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); return(-1); + } if (!TTEST2(*(cp + 1), 1)) return(-1); if ((bitlen = *(cp + 1)) == 0)