Commit Graph

54022 Commits

Author SHA1 Message Date
Martin Kaiser 32ae5735e3 don't print the interface description if it's null
(named pipes added with -i <pipe name> don't have such a description)

Change-Id: I5986c607f5103b800c4353fd3cf01f24149e2e5c
Reviewed-on: https://code.wireshark.org/review/2940
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-08 13:39:50 +00:00
Martin Kaiser fdc7e5af28 better description of ifaces and all_ifaces
Change-Id: I148beb52574b0f7d990722901b72653c71026cb8
Reviewed-on: https://code.wireshark.org/review/2939
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-08 13:26:40 +00:00
Graham Bloice a7e616d162 Fix the flex wrapper to ensure Cygwin /bin is on the path for Windows.
This is needed for CMake, as it doesn't add Cygwin to the path for the
generated solutions.

Change-Id: I9f05f24ccc741bfc851ecbb892f080f59d2acc2c
Reviewed-on: https://code.wireshark.org/review/2938
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-08 13:14:42 +00:00
Alexis La Goutte b0a7251f38 Fix Uninitialized argument value found by Clang Analyzer
Change-Id: Ia39d7b258a888c188ae7d87c3c907e2a0ad1d3f0
Reviewed-on: https://code.wireshark.org/review/2936
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:39:20 +00:00
Alexis La Goutte 4e478aac67 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I369c4620f47f92bf66722fa79582502c0897a316
Reviewed-on: https://code.wireshark.org/review/2935
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:38:28 +00:00
Alexis La Goutte 033249ec62 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Idc6e9cf8f7f4b8e18a50723acbe5dee4c8cb786c
Reviewed-on: https://code.wireshark.org/review/2934
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:36:55 +00:00
Pascal Quantin 55ce1bc6a6 Upgrade LPP dissector to v11.5.0
Change-Id: I8c51cebec5b234b9d0667aaf3f70b0a48bb842f6
Reviewed-on: https://code.wireshark.org/review/2933
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:30:33 +00:00
Tatsuhiro Tsujikawa a6fc598aa7 Enhance HTTP/2 HPACK header decompression handling
Previously we just call HPACK decompressor when dessecting packets.
This is fine for the first linear scan.  But later same packet may be
dissected more than once and their header block data will be fed into
decompressor again.  This makes header compression context out-of-sync
because HPACK decompressor only works when data is fed linearly.  This
change fixes this issue by caching decompressed headers in the first
linear scan.  On random packet dissecting, they are just looked up.
This change adds support of changing header table size by inspecting
SETTINGS frame and tracking its SETTINGS ACK.

Change-Id: I9c75c67f8677063e443f9b131740f3ee94ff8a63
Reviewed-on: https://code.wireshark.org/review/2616
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:23:21 +00:00
Tatsuhiro Tsujikawa 36c393321e Dissect HTTP/2 draft-13
Summary of changes since draft-12:

* Pad High and Pad Low wereare replaced with single Pad Length field.
* Padding was removed from CONTINUATION frame.
* ALTSVC and BLOCKED frames were removed.
* Per-frame compression and its associated SETTINGS flag were removed.
* HPACK Huffman code table and static header table were updated.

Change-Id: I9c4f05f8cd937bfadbb1b912f2b9ffb31e9c18d5
Reviewed-on: https://code.wireshark.org/review/2615
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:18:29 +00:00
Peter Wu 46b3dda046 iscsi: automatically detect data segment digest
Modelled after ccf7ed00b6 which detects
the header digest field, this patch adds auto-detection for the Data
Digest field which comes after the data segment.

Since the digest is now automatically detected, drop the three related
preferences.

Verified against scsi-osd-example-001.pcap (from SampleCaptures).

Change-Id: Icd89f1be58889c7ab70aca9dff7d3f99c8fe04d6
Reviewed-on: https://code.wireshark.org/review/2882
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:15:45 +00:00
Evan Huus 9d5bf53346 udvm: free the buffer *before* throwing the exception
Freeing it after the exception doesn't do much, for obvious reasons. Also move
the allocation a bit later, and add modelines.

This fixes one major memory leak, although on inspection this code still isn't
safe since there are exception-throwing functions called all over the place with
glib memory active. Outside the scope of this fix though.

Bug: 10265
Change-Id: I1fe272e92b92cac6b99abb84866b8ae9b582e24c
Reviewed-on: https://code.wireshark.org/review/2931
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 04:21:46 +00:00
Peter Wu 8fbc0db7d2 conversion: do not free conversation memory on updates
In commit 4afd70d ("Use g_hash_table_new_full to free some values"), the
hashtable gained a destroy handler which frees memory. This
inadvertently destroyed a conversation during key updates.

Fix this by not calling _remove (and thereby calling the destroy
handler), but use _steal instead. (Suggestion by Evan Huus).

Bug: 10263
Change-Id: I9fa7f5a697599f42894d38718b00b9c0c1b57004
Reviewed-on: https://code.wireshark.org/review/2924
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-08 03:46:04 +00:00
Peter Wu 9b4f16a204 gsmtap: do not abort if dissector is unavailable
Encountered with the following attachments from bugs:
6575-test-dlmapc-wmx
6577-test-dlmapc-wmx
6579-test-dlmapc-wmx

Also added modelines.

Change-Id: I3859bed618830ad359bd0b2b1fdfc3c5fc13269e
Reviewed-on: https://code.wireshark.org/review/2920
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-08 03:45:31 +00:00
Alexis La Goutte e82e137bf1 Fix Dereference of null pointer found by Clang analyzer
after change of ga67b7f5b5

Change-Id: I03155b46dc35274915f7a7c16fad81f97e0dc5bf
Reviewed-on: https://code.wireshark.org/review/2911
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-08 03:40:40 +00:00
Alexis La Goutte 390e9bb5db Fix Dereference of null pointer found by Clang analyzer
Change-Id: I050c187acdb4c97bb164cefee67f65b69d7e6782
Reviewed-on: https://code.wireshark.org/review/2914
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-08 03:40:00 +00:00
Bill Meier cdf6d62b3b tools/pre-commit: Complete all checks on all files before exiting with Ok/Fail status.
Change-Id: Iea6df6fbe5a977b282e823f87cd9f760e92a3e22
Reviewed-on: https://code.wireshark.org/review/2918
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-08 00:49:47 +00:00
Gerald Combs 858558e619 Update README.qt and add todo items.
Change-Id: I69c080253cf7e861c575573e74a66b83e014cbb0
Reviewed-on: https://code.wireshark.org/review/2925
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-07 22:12:09 +00:00
AndersBroman 1ff6213c94 Try to fix cast discards '__attribute__((const))' qualifier from pointer
target type

Change-Id: If7efc629247480fbfb231b965a358803b67e1504
Reviewed-on: https://code.wireshark.org/review/2919
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 15:16:54 +00:00
AndersBroman 4ac9895884 See if yhis fixes "cast discards '__attribute__((const))' qualifier from
pointer target type"

Change-Id: I0f97b119f1e6151622d360464f12ad399cbaf117
Reviewed-on: https://code.wireshark.org/review/2917
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 14:34:27 +00:00
Martin Mathieson 7801a97fd8 Trying to create and use an empty tvb now throws an exception. Just pass current tvb to mac-lte dissector.
Change-Id: I4aa24342192ec079254f26e00317470377c3e20b
Reviewed-on: https://code.wireshark.org/review/2916
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-07-07 10:42:14 +00:00
Alexis La Goutte 3c638d8bf8 Fix Branch condition evaluates to a garbage value found by Clang Analyzer
Change-Id: I2cb4fb8064c80ee7985c3908820f09f5fa7e37fb
Reviewed-on: https://code.wireshark.org/review/2913
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 10:25:20 +00:00
Роман Донченко 4ce4e3a41e make-dissector-reg: minor tweaks
* use grep -c instead of a grep/wc combo;
* use cmp instead of diff, since we're only interested in whether the files
  are identical;
* remove the temporary file if it's the same as the existing one.

Change-Id: If61c5675535c483b9dc2aee179d7be58c7bd6e4f
Reviewed-on: https://code.wireshark.org/review/2894
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 07:24:24 +00:00
Gerald Combs 4cdd17a59d Qt: Cache packet list column strings.
For each displayed packet list row, save a copy of or a pointer to
column strings similar to ui/gtk/packet_list_store.c. This lets us call
epan_dissect_run only once per row.

Bug: 9511
Change-Id: I17e8ebeb5ed70518c9047413c3b2a46f01e904ef
Reviewed-on: https://code.wireshark.org/review/2752
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 06:24:23 +00:00
Guy Harris 593878299d Don't cast away constness if not necessary.
Change-Id: I5f6ecd246e358edc3a2f4963c201b2435e4a1a42
Reviewed-on: https://code.wireshark.org/review/2910
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:46:45 +00:00
Guy Harris e286acd05f Squelch compiler warning.
Change-Id: I37c495cb4d68b95d8388c654bbf6a817167261ac
Reviewed-on: https://code.wireshark.org/review/2909
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:34:34 +00:00
Guy Harris 9dfb3e7b46 Wrong macro.
Change-Id: I2e0e7c1a30c9fc2d5af7cbd53dae26ad9a619e71
Reviewed-on: https://code.wireshark.org/review/2908
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:32:11 +00:00
Guy Harris eea2e15638 G_GNUC_FORMAT encapsulates __attribute((format_arg(...))).
Change-Id: I9513c187ae4ce8b8cf8f6a926072b215e26ec64f
Reviewed-on: https://code.wireshark.org/review/2907
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:29:41 +00:00
Peter Wu aa4066dccf skinny: fix retval, convert from tvb_length
New dissectors return an integer, not a boolean, fix that.

Change-Id: I79dea0cc4274d503d61ce8823dc783c542764f6b
Reviewed-on: https://code.wireshark.org/review/2884
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-07 01:46:59 +00:00
Guy Harris 0a2f6fc01a Squelch some compiler warnings.
Change-Id: I768bf577b3871171ab33f080c5a0099ac06718ce
Reviewed-on: https://code.wireshark.org/review/2906
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 00:11:59 +00:00
Michael Mann 4d58904a09 convert to proto_tree_add_subtree[_format]
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144
Reviewed-on: https://code.wireshark.org/review/2904
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-07 00:03:35 +00:00
Guy Harris 79fcc6a1a3 Squelch some compiler warnings.
Change-Id: Ie39c7b0c1fef8f862cec016a3a1a5bd1451a3df2
Reviewed-on: https://code.wireshark.org/review/2905
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 23:49:04 +00:00
Peter Wu f2b4daf400 Add printf-format annotations, fix garbage
The WRETH dissector showed up some garbage in the column display. Upon
further inspection, it turns out that the format string had a trailing
percent sign which caused (unsigned)-1 to be returned by
g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is
called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows
up. ASAN could not even catch this error because EP is in charge of
this.

So, start adding G_GNUC_PRINTF annotations in each header that uses
the "fmt" or "format" paramters (grepped + awk). This revealed some
other errors. The NCP2222 dissector was missing a format string (not
a security vuln though).

Many dissectors used val_to_str with a constant (but empty) string,
these have been replaced by val_to_str_const. ASN.1 dissectors
were regenerated for this.

Minor: the mate plugin used "%X" instead of "%p" for a pointer type.

The ncp2222 dissector and wimax plugin gained modelines.

Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622
Reviewed-on: https://code.wireshark.org/review/2881
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 23:00:40 +00:00
Peter Wu ec6a22dc3b Workaround for ASAN failure in _ws_mempbrk_sse42
When ASAN is enabled, a false buffer overflow warning is raised. It is
a false positive since everything starting at '\0' will get ignored by
the PCMPISTRI instruction (see Intel(r) SSE4 Programming Reference,
5.3.1.5 "Valid/Invalid Override of Comparisons", and 5.3.1.2
"Aggregrate Operation", case "Equal any").

Concerns about reading past the end of the page turns out to be false,
there always seem to be a valid page after the current one (for static
and heap memory at least). It is an non-issue since strlen also does
not have issues with this.

Rather than fully disabling SSE 4.2 and using the fallback
implementation for ASAN-enabled builds, read the set of characters from
'a' into the mask without a 128-bit read and then still use SSE 4.2
for the actual query.

Bug: 10214
Change-Id: Ie4a526e60b43bfc08dd1d821556766f14a49be4d
Reviewed-on: https://code.wireshark.org/review/2618
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 22:53:34 +00:00
Peter Wu 49bc1047be whois,finger: fix retval, convert from tvb_length
Fixes dissector bug:
failed assertion "save_desegment_offset == pinfo->desegment_offset &&
save_desegment_len == pinfo->desegment_len"

Change-Id: Ia475bea3726252530189a05ba4dbf69f3c2b7e6c
Reviewed-on: https://code.wireshark.org/review/2886
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 22:05:26 +00:00
Guy Harris 5bfc21cf9e Clean up handling of missing functions.
With autotools, CMake, and nmake, if we have a function, #define
HAVE_{function_name_in_all_caps}, otherwise don't #define it.

If we provide our own version of a function in libwsutil, make sure we
have a header that declares it, and *ONLY* include that header if
HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have
the system declaration and our declaration colliding.

Check for inet_aton, strncasecmp, and strptime with CMake, just as we do
with autotools.

Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in
autotools.

Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889
Reviewed-on: https://code.wireshark.org/review/2903
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 21:03:09 +00:00
Pascal Quantin e649420686 H264: mark a parameter as unused
Change-Id: I564a0fefc263d909c9e478b64c5a816756d97377
Reviewed-on: https://code.wireshark.org/review/2902
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06 19:44:01 +00:00
Pascal Quantin 032c261997 GTK: fix crash when closing Capture Options dialog box on Windows
Introduced in g929afd2

Change-Id: I911994af2a210f00cd099f26e68d1e1f0fea577b
Reviewed-on: https://code.wireshark.org/review/2901
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06 19:14:52 +00:00
Britt McKinley 4e9802e679 H264: Add support of packetization modes, SVC, MS-H264
Add support for Prefix, STAP, MTAP, NI-MTAP, and PACSI packet types.
Add support for Microsoft SEI messages [MS-H264PF]
Add support for dissecting scalable profiles
SDP: Add profile-level-id decode for payload type H264-SVC
MS-H264PF: http://msdn.microsoft.com/en-us/library/hh659565.aspx
Update #1 - Fix Tabs -> Spaces, Reinsert accidentally removed entry 19
from h264_type_values
Update #2 - Changed to using expert info for exceptions and Microsoft
errata.
Update #3:
  - Correct handling of truncated packets
  - Use guid functions and compare techniques
  - Correct ranges for expert info messages
  - Change to using reported_length from captured_length

Change-Id: I520a3c9a6d85c78a976b520cf5a6a405064a48f1
Reviewed-on: https://code.wireshark.org/review/2580
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06 19:11:24 +00:00
Alexis La Goutte c35b82c8f1 RTCP: Make checkhf happy
Change-Id: I5cdeb4a96bc9c4e11161836457a8689c904e13d4
Reviewed-on: https://code.wireshark.org/review/2899
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:32:17 +00:00
Alexis La Goutte 68daa668e4 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I9946e55ee33ccbf57c6b268f725f5b1a537b61a9
Reviewed-on: https://code.wireshark.org/review/2897
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:31:20 +00:00
Alexis La Goutte 550f611162 RTCP: fix typo (double semicolon)
Change-Id: Id1997c3c8f6d0460da7f0faa58798a72737dd667
Reviewed-on: https://code.wireshark.org/review/2898
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06 18:30:26 +00:00
Alexis La Goutte 841b1d652c Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I5744a1c1efc65f9a7b3addf17c071b470fd2cced
Reviewed-on: https://code.wireshark.org/review/2896
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:30:06 +00:00
Alexis La Goutte 84189ded75 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I82efd1c5f4280de2eec3dbe7bd1995fcd9a3174f
Reviewed-on: https://code.wireshark.org/review/2895
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:28:23 +00:00
Michael Mann c71e88e4a9 convert to proto_tree_add_subtree[_format]
Change-Id: I3efa2a81ab2685cde6eae0a00b24520478a545ce
Reviewed-on: https://code.wireshark.org/review/2900
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06 18:26:48 +00:00
Evan Huus be4d42c6ab Widen openflow variables and check for underflows
As suggested by Alexis reviewing change Ie76c5a810af927b, this issue was
scattered throughout the v4/v5 openflow dissectors. Hopefully I got all of them.
Original issue found in bug 10259.

Change-Id: Idf87deea34132aec5cd4e8f83264906a29b15568
Reviewed-on: https://code.wireshark.org/review/2878
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-06 16:53:39 +00:00
Peter Wu 5886e45179 iscsi: minor retval fix
The return value of new dissectors is the number of bytes that were
successfully dissected, not a boolean. Fix that and get rid of an
unnecessary iSCSIPdusDissected variable.

Change-Id: Ie31df393a1eb44f185d320a4c2d35f5e8b7d7bd9
Reviewed-on: https://code.wireshark.org/review/2889
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:51:45 +00:00
Peter Wu d828b15a82 kismet: fix retval, add modelines
new dissectors return an int, not a boolean...

Change-Id: I88e19f7c0dc14da3649d1522ffe936538a867753
Reviewed-on: https://code.wireshark.org/review/2888
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:47:51 +00:00
Peter Wu 2eae8bb0c3 mikey: do not request more data on proto violation
Return value "-1" means that more data is requested. The dissector
actually doesn't have any idea what to do with the data, so just return
the data dissected so far.

tcp stream 3182 from c05-http-reply-r1.pcap (SampleCaptures) was
incorrectly detected as MIKEY, it was actually HTTP...

Change-Id: Idca3d3e2f85e821df70436a675699b5834236f89
Reviewed-on: https://code.wireshark.org/review/2887
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:45:33 +00:00
Peter Wu b54731dc7d ms-mms: fix retval for short pkts, fix reading flags
uint16 & 0xFF00 will always equal 0. Use tvb_get_guint8 instead. Convert
from tvb_length to tvb_captured_length.

Fix the return value of dissectors, 0 means reject but that cannot be
combined with reassembly requests.

Change-Id: I5fca66e2e809699392237aff5813eecdfb15857f
Reviewed-on: https://code.wireshark.org/review/2885
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:42:58 +00:00
Gerald Combs 03d6f1b0db [Automatic manuf, services and enterprise-numbers update for 2014-07-06]
Change-Id: Idc1a85851a01b5b675465b659871cdf750845ace
Reviewed-on: https://code.wireshark.org/review/2890
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-06 15:16:14 +00:00