Commit Graph

40044 Commits

Author SHA1 Message Date
Anders Broman 9a4a387e12 From Cristian Constantin:
while caching the last element from the conversation hash chain lists speeds-up
the operation when the hash/chain lists are actually built, it 
does NOT help a lot when a certain random conversation which is in the hash
table is looked-up.

I did some profiling and tracing and I saw that a lot of cpu time is spent in
the function conversation_lookup_hashtable() when wireshark
is asked to show the "Flow Graph", "TCP Conversations", "Voip Calls".  I used
two types of captures with over 500k packets:

- tcp packets having the _same_ src ip addr, src tcp port, dst ip addr, dst tcp 
  port
- (mostly) sip packets containing sdp payloads which advertise the _same_ ip
  addr, udp port for media

these types of captures lead to _huge_ chain lists behind the same hash bucket 
(to which the conversation is actually mapped)

the solution would be to cache the last found conversation into the head of the 
chain list and to use it whenever it is possible; most of the time the look-up
will be in O(1) instead of O(n) (n - number
of elements in the list).

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7149

svn path=/trunk/; revision=42141
2012-04-19 13:59:14 +00:00
Alexis La Goutte 990d1ad71e From Francisco Vidal Meca via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7136
HIP dissector: PUZZLE and SOLUTION parameters variable size

According to specifications, puzzle and solution parameters carry Random #I and
#J fields that has variable length depending of the Hash function. The fields
are recognized with a fixed value of 8 bytes.

The #I and #J fields should be determined depending of the TLV size.

See http://tools.ietf.org/html/draft-ietf-hip-rfc5201-bis-08#section-5.2.5 .

svn path=/trunk/; revision=42140
2012-04-19 12:41:12 +00:00
Anders Broman 61a6d25bc2 From Andy Karch:Add L2TP filter on Control Message AVP value. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7145. From me make it compile and add l2tp_message_type_short_str_vals
svn path=/trunk/; revision=42139
2012-04-19 06:12:12 +00:00
Anders Broman 61cda0a6c4 From Evan Huus: Convert a few instances in conversation.c to use the new macro. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7142
svn path=/trunk/; revision=42138
2012-04-19 05:49:38 +00:00
Anders Broman 82a60c13d0 From Evan Huus: Add DISSECTOR_ASSERT_HINT() macro https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7142
svn path=/trunk/; revision=42137
2012-04-19 05:44:50 +00:00
Anders Broman 52e6a290c0 From Evan Huus: Two bad NULL checks in airpcap_loader.c https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7141
svn path=/trunk/; revision=42136
2012-04-18 18:17:40 +00:00
pascal 1cc3ca7aa1 Use extended value strings for BSR and PHR and remove a useless hf entry
svn path=/trunk/; revision=42135
2012-04-18 16:55:06 +00:00
Gerald Combs 17febadb12 Terminate our inner loops as well.
svn path=/trunk/; revision=42134
2012-04-18 16:10:08 +00:00
Gerald Combs bb606959f7 Tell the main loop to terminate when we catch a signal instead of trying
to clean up in two places.

svn path=/trunk/; revision=42133
2012-04-18 16:04:05 +00:00
Alexis La Goutte 5187255e38 From Francisco Vidal Meca via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7136
HIP dissector: HIT_SUITE_LIST parameter from HIPv2

The HIT_SUITE_LIST Parameter from HIPv2 (
http://tools.ietf.org/html/draft-ietf-hip-rfc5201-bis-08 ) is unsupported.

svn path=/trunk/; revision=42132
2012-04-18 13:42:41 +00:00
Jakub Zawadzki 68ec58d385 Fix some: 'cast discards qualifiers from pointer target type' warnings
- Add const qualifier
- Remove some strange casts

svn path=/trunk/; revision=42131
2012-04-18 12:35:36 +00:00
Anders Broman 658fc3cb04 From Yaniv Kaul:
Enhance the Spice dissector to dissect KEY_DOWN, KEY_UP, {RECORD|PLAYBACK}_{VOLUME|MUTE}

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7133

svn path=/trunk/; revision=42130
2012-04-18 11:29:37 +00:00
Anders Broman fec452c2b1 Fix Bug 7119 ANSI MAP infinite loop.
Make conumed a guint16 to avoid wrapping add expert items.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7119

svn path=/trunk/; revision=42129
2012-04-18 11:12:15 +00:00
Michael Tüxen 401a7109a8 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7137
svn path=/trunk/; revision=42128
2012-04-18 10:11:33 +00:00
Anders Broman ec0c5baf4f From Rolf Fiedler:
patch to fix mp2t.c to reject more byte streams that are not MPEG2.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7132

svn path=/trunk/; revision=42127
2012-04-18 08:32:12 +00:00
Anders Broman 7422d0ad08 Show WIRETAP_ENC
svn path=/trunk/; revision=42126
2012-04-18 08:26:08 +00:00
Anders Broman be31ffaeb0 Get the Windows build going again. The Netxray "fix" cast to guint8 may not be OK.
svn path=/trunk/; revision=42125
2012-04-18 08:15:32 +00:00
Alexis La Goutte 323dd70e2b Update Domain Name System Security (DNSSEC) Algorithm Numbers and Delegation Signer (DS) Resource Record (RR)
Add RFC5933 : Use of GOST Signature Algorithms in DNSKEY and RRSIG Resource Records for DNSSEC
 Add RFC6605 : Elliptic Curve Digital Signature Algorithm (DSA) for DNSSEC

svn path=/trunk/; revision=42124
2012-04-18 07:33:57 +00:00
Alexis La Goutte 6aedbbaf35 From Colus Tang via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7134
Unable to display the correct IEEE802.11 MCS data rates due to header definition

The problem is due to the ieee_802_11_phdr.data_rate is defined as guint8,
since this variable is counting number of 0.5Mbps units, any datarates which is
higher than 255Mbps would get wrapped up.  In the above example, only the lower
8bit value will be put into the ieee_802_11_phdr which is 0x04 and result in
the incorrect 2Mbps display.

There are 802.11n WLAN product is capable to transmit @450Mbps, we should fix
this data_rate from guint8 to guint16.

#BACKPORT

svn path=/trunk/; revision=42123
2012-04-18 07:22:12 +00:00
Anders Broman e6b7af69b5 From Evan Huus: There were two cases where we could underflow an unsigned subtraction, leading to huge values and near-infinite loops. Catch them and add an expert_info warning that the packet is bad. Also fix some other expert_info messages to hang off of the right dissection tree. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7125
svn path=/trunk/; revision=42122
2012-04-18 05:29:02 +00:00
Anders Broman 67c79aea50 From Evan Huus: Catch impossible sub-field counts. Fixes LTP infinite loop https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7124
svn path=/trunk/; revision=42121
2012-04-18 05:24:32 +00:00
Guy Harris 477185a387 If we see a 5View time-stamped header with a bad key, make sure we
return the right error code and information string.

InfoVista bought Accellent Group, and, at least according to the
InfoVista Web site, it's "5View", not "5Views".

svn path=/trunk/; revision=42119
2012-04-18 02:48:23 +00:00
Guy Harris 81209da65b Fix some indentation errors from the previous change.
svn path=/trunk/; revision=42118
2012-04-18 00:54:11 +00:00
Guy Harris e3053e0105 Get rid of tabs, so we don't have to worry about 4-space vs. 8-space tabs.
svn path=/trunk/; revision=42117
2012-04-18 00:51:18 +00:00
Guy Harris 55b4bc0061 Might as well make the loop indices just guint; the generated code's
unlikely to be worse, and could be better on the 32-bit-and-bigger
machines on which Wireshark runs.

svn path=/trunk/; revision=42116
2012-04-17 23:08:23 +00:00
Guy Harris defd6f9852 Flag too-short TLVs with an expert info item - and treat any TLV length
less than 4 as "too short", as the TLV length includes the type and
length fields.

svn path=/trunk/; revision=42115
2012-04-17 22:36:50 +00:00
Anders Broman cc650868af From Evan Huus: We were using guint8s as loop counters based on field lengths, and they were overflowing/wrapping falsely. Making them guint16s fixes the problem. Bug 7122 -HCIEVT infinite loop https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7122
svn path=/trunk/; revision=42114
2012-04-17 21:09:10 +00:00
Anders Broman dc49bf04c0 From Evan Huus: Break from the loop if the length is zero. Fix [Bug 7120] ASF infinite loop https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7120
svn path=/trunk/; revision=42113
2012-04-17 21:00:56 +00:00
Anders Broman 3a95e4cd8b From Francesco Fondelli: fixes up issue 1) and 3) described in the bug report https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7089
svn path=/trunk/; revision=42112
2012-04-17 20:49:56 +00:00
pascal 4a530904f8 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7131 :
Always store UDL/length in hash table and check pointer coming from lookup before using it

svn path=/trunk/; revision=42111
2012-04-17 13:17:39 +00:00
ruengeler 61e2ac924d Fix bug #7112, where the interface ids were not saved
svn path=/trunk/; revision=42110
2012-04-17 13:13:30 +00:00
ruengeler c37ae40436 Fix a typo in my name
svn path=/trunk/; revision=42109
2012-04-17 13:04:07 +00:00
pascal 8391900c9e From Bertho Stultiens:
Use certificate values from RFC 4398
From me: rename fields according to RFC and update references to RFC
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7130

svn path=/trunk/; revision=42108
2012-04-17 12:44:04 +00:00
Alexis La Goutte 193386b281 From me via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7115
802.11s Decoding Bug (Mesh Control Field)

Wrong offset use to dissector Mesh Extended Address(bug from the revision 39314)

svn path=/trunk/; revision=42105
2012-04-17 07:40:11 +00:00
Anders Broman 26bc6e72d7 From Evan Huus:
Do the right thing with conversation hash chains.

Adds two new functions: conversation_insert_into_hashtable() and
conversation_remove_from_hashtable() that do the right thing with conversation
hash table chains and ordering and all that. Converts conversation_new(),
conversation_set_addr2() and conversation_set_port2() to use the new functions.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7085

svn path=/trunk/; revision=42104
2012-04-17 07:17:37 +00:00
Anders Broman bb562d518a From Jakub Zawadzki: fix, which changes types from FT_STRING to FT_DOUBLE. Fixes GeoIP: Display Filter comparisons operators do not seem to work for negative latitude or longitude values... https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5077
svn path=/trunk/; revision=42103
2012-04-17 04:51:07 +00:00
pascal 570d20a978 From Nick Lowe:
Add a security warning if EAP-LEAP or EAP-MD5 is seen.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7020

svn path=/trunk/; revision=42102
2012-04-16 18:36:01 +00:00
pascal a4232cc6bd Remove non-ASCII character
svn path=/trunk/; revision=42101
2012-04-16 18:13:34 +00:00
Chris Maynard 3f7146a937 Define ISUP_ITU_STANDARD_VARIANT before using it.
svn path=/trunk/; revision=42100
2012-04-16 17:17:18 +00:00
Anders Broman b365941321 Introduce a preference to set Standard or National ITU ISUP variant.
svn path=/trunk/; revision=42099
2012-04-16 15:52:32 +00:00
Anders Broman 3f87ab8e85 Add dissection of French national messages.
svn path=/trunk/; revision=42098
2012-04-16 15:28:57 +00:00
Alexis La Goutte 2f41d15871 Make checkhf happy (a bad copy/paste ?)
Add Modelines information

svn path=/trunk/; revision=42097
2012-04-16 15:18:51 +00:00
Alexis La Goutte 4c3c50613b From Paco via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7111
HIP dissector of the HIP_CIPHER parameter is wrong

From me:
Add a hf_tlv_cipher_id and use proto_tree_add_item

svn path=/trunk/; revision=42096
2012-04-16 15:17:33 +00:00
Anders Broman d7192a8bac Use content_type_parameter_str in dissect_application_isup()
to determine ISUP standard and ISUP variant(French).

Also fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6258

svn path=/trunk/; revision=42095
2012-04-16 14:11:32 +00:00
Anders Broman 4d897229f6 bool value should be FALSE.
svn path=/trunk/; revision=42094
2012-04-16 13:29:57 +00:00
Anders Broman a43d44f907 Separate ANSI and ITU messages.
svn path=/trunk/; revision=42093
2012-04-16 13:28:41 +00:00
Anders Broman d5f59e4efa From Nick Lowe:
Improve names for the EAP types, add missing definition. 

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7020

svn path=/trunk/; revision=42092
2012-04-16 08:47:18 +00:00
Anders Broman fc41d4ad51 From Evan Huus:
Duplicate and misplaced 'break' statements.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7106

svn path=/trunk/; revision=42091
2012-04-16 08:39:34 +00:00
Alexis La Goutte 9380f962a2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=42090
2012-04-16 07:59:48 +00:00
Guy Harris 53155a11c0 Get rid of the error code argument to scan_local_interfaces(); nobody
uses it once it's filled in.

From Evan Huus: in scan_local_interfaces(), pass NULL to
capture_interface_list(), as we don't use the error string (and don't
free it, either).

In fill_capture_box(), for CANT_GET_INTERFACE_LIST, include the error
string in the report, and free it, in all cases, when we're done with
it.

svn path=/trunk/; revision=42089
2012-04-15 23:03:58 +00:00