From: Bill Fenner Date: Mon, 13 Feb 2012 16:27:08 +0000 (-0800) Subject: IGMPv3's Max Response Time is in units of 0.1 second. X-Git-Tag: tcpdump-4.3.0~35^2~1^2~1 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/da7a3c3c849ea001c4a92ae0ad359d5cb86cae66 IGMPv3's Max Response Time is in units of 0.1 second. If it's less than 60 seconds, print it as %.1fs, to be able to accurately represent small values including the tenths-of-a-second. Only use relts_print() when it is 60 seconds or more. --- diff --git a/print-igmp.c b/print-igmp.c index 6522bc30..a0c8d6fe 100644 --- a/print-igmp.c +++ b/print-igmp.c @@ -227,7 +227,11 @@ print_igmpv3_query(register const u_char *bp, register u_int len) } if (mrc != 100) { (void)printf(" [max resp time "); - relts_print(mrt); + if (mrt < 60) { + (void)printf("%.1fs", mrt * 0.1); + } else { + relts_print(mrt / 10); + } (void)printf("]"); } TCHECK2(bp[4], 4);