Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 8897] New: SIP stats shows incorrect values for Max/Ave se

Date: Thu, 04 Jul 2013 10:49:18 +0000
Bug ID 8897
Summary SIP stats shows incorrect values for Max/Ave setup times
Classification Unclassified
Product Wireshark
Version 1.10.0
Hardware x86
OS Mac OS X 10.8
Status UNCONFIRMED
Severity Normal
Priority Low
Component TShark
Assignee [email protected]
Reporter [email protected]

Created attachment 11147 [details]
Sample capture with some SIP packets

Build Information:
joe@cooley:~/lab2/wireshark-1.10-trunk$ ./tshark -v
TShark 1.10.1 (SVN Rev 50375 from /trunk-1.10)

Copyright 1998-2013 Gerald Combs <[email protected]> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with GLib 2.28.6, with libpcap, with libz 1.2.3.4, with POSIX
capabilities (Linux), without libnl, with SMI 0.4.8, with c-ares 1.7.3, with
Lua
5.1, without Python, with GnuTLS 2.8.6, with Gcrypt 1.4.6, with MIT Kerberos,
with GeoIP.

Running on Linux 2.6.38-16-generic, with locale en_US.UTF-8, with libpcap
version 1.1.1, with libz 1.2.3.4.
Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz

Built using gcc 4.5.2.

--
The SIP stats struct in ui/cli/tap-sipstat.c is not initialized and can produce
incorrect SIP stats.

Example, look at the MAX Setup time at the end of sip stats.

joe@cooley:~/lab2/wireshark-1.10-trunk$ ./tshark -r ~/vonage.pcap -q -z
sip,stats

===================================================================
SIP Statistics

Number of SIP messages: 25
Number of resent SIP messages: 0

* SIP Status Codes in reply packets
  SIP 407 Proxy Authentication Required :     2 Packets
  SIP 180 Ringing         :     3 Packets
  SIP 183 Session Progress :     1 Packets
  SIP 200 OK              :     7 Packets
  SIP 100 Trying          :     1 Packets

* List of SIP Request methods
  INVITE          :     2 Packets
  ACK             :     2 Packets
  REGISTER        :     5 Packets
  BYE             :     2 Packets

* Average setup time -638050174 ms
 Min 28 ms
 Max 1802658152 ms
===================================================================


The fix is just to use g_new0 instead when allocating the sip stat struct. The
same bug exists in 1.8 with g_malloc vs. g_malloc0.

joe@cooley:~/lab2/wireshark-1.10-trunk$ svn diff
Index: ui/cli/tap-sipstat.c
===================================================================
--- ui/cli/tap-sipstat.c    (revision 50380)
+++ ui/cli/tap-sipstat.c    (working copy)
@@ -398,7 +398,7 @@
         filter=NULL;
     }

-    sp = g_new(sipstat_t,1);
+    sp = g_new0(sipstat_t,1);
     if(filter){
         sp->filter=g_strdup(filter);
     } else {


You are receiving this mail because:
  • You are watching all bug changes.