Commit Graph

17278 Commits

Author SHA1 Message Date
Jeff Morriss ea02598924 Fix the rest of of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764 :
The Lua API does not have FT_*, it has ftypes.*, so use that in the
documentation.  Also, list out each ft so the user knows what the available
options are.

svn path=/trunk/; revision=41035
2012-02-16 03:00:52 +00:00
Anders Broman a2df0df2ae From Pascal Quantin:
[NAS EPS] PDN Connectivity Request message dissection fixes.

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

svn path=/trunk/; revision=41033
2012-02-15 22:56:20 +00:00
Anders Broman f75ef6be38 From Andy Karch:
Enhance L2TP filters to include assigned IDs.

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

svn path=/trunk/; revision=41031
2012-02-15 06:01:01 +00:00
Anders Broman 9fa3449bc8 From David Wei:
Fix handling of piggybacked messages.

svn path=/trunk/; revision=41029
2012-02-14 20:23:02 +00:00
Jeff Morriss 2ebec4aae6 As Guy suggested in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6765 :
Since his r41025 change to the HTTP dissector fixes the problem reported in
the subject bug, revert r41018 (whose check-in comment, BTW, should have
referenced this bug instead of 6817).

svn path=/trunk/; revision=41028
2012-02-14 20:06:48 +00:00
Jörg Mayer 49854a07a3 - dissect_vendor_ie_atheros:
Remove tag_len parameter - it was redundant.
  The length passed no longer contains the vendor id.
- add_tagged_field / TAG_VENDOR_SPECIFIC_IE:
  Reorder so that the ieee "standard" vendor ids come fist,
  after that the really vendor specific stuff.

svn path=/trunk/; revision=41027
2012-02-14 18:34:59 +00:00
Guy Harris 7e51e80fe0 To quote section "7.2.1 Type" of RFC 2068, "Hypertext Transfer Protocol
-- HTTP/1.1":

   Any HTTP/1.1 message containing an entity-body SHOULD include a
   Content-Type header field defining the media type of that body. If
   and only if the media type is not given by a Content-Type field, the
   recipient MAY attempt to guess the media type via inspection of its
   content and/or the name extension(s) of the URL used to identify the
   resource. If the media type remains unknown, the recipient SHOULD
   treat it as type "application/octet-stream".

To quote section "4. Encoding of Transport Layer" of RFC 2565, "Internet
Printing Protocol/1.0: Encoding and Transport":

   HTTP/1.1 [RFC2068] is the transport layer for this protocol.

	...

   Note: even though port 631 is the IPP default, port 80 remains the
   default for an HTTP URI.  Thus a URI for a printer using port 631
   MUST contain an explicit port, e.g. "http://forest:631/pinetree".  An
   HTTP URI for IPP with no explicit port implicitly reference port 80,
   which is consistent with the rules for HTTP/1.1. Each HTTP operation
   MUST use the POST method where the request-URI is the object target
   of the operation, and where the "Content-Type" of the message-body in
   each request and response MUST be "application/ipp". The message-body
   MUST contain the operation layer and MUST have the syntax described
   in section 3.2 "Syntax of Encoding". A client implementation MUST
   adhere to the rules for a client described for HTTP1.1 [RFC2068]. A
   printer (server) implementation MUST adhere the rules for an origin
   server described for HTTP1.1 [RFC2068].

So, when choosing a subdissector for HTTP request bodies, search based
on the media type first, and only if we *don't* find a dissector for the
media type, do other stuff such as heuristics or choosing a subdissector
based on the port number.

This fixes a number of problems; in particular, it fixes bug 6765
"non-IPP packets to or from port 631 are dissected as IPP" without
requiring the IPP dissector to attempt to determine whether an entity
body looks like IPP.  It also ensures that the default dissector for
HTTP entity bodies, the "media" dissector, will get the media type
passed to it in pinfo->match_string.

Don't use "!str*cmp()" while we're at it - it's valid C, but the "!" can
make it look as if it's checking for something not being the case when,
in fact, you're checking for equality rather than inequality.  (The
str*cmp() routines don't return Boolean results.)

svn path=/trunk/; revision=41025
2012-02-14 06:00:14 +00:00
Jeff Morriss 38550ff3ce Fix part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764 :
The Lua API does not have BASE_*, it has base.*, so use that.  Also, list out
each base so the user knows what the available options are.

svn path=/trunk/; revision=41024
2012-02-14 03:37:19 +00:00
Jeff Morriss d92857dd6b As suggested in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6763 :
Give an example of a Pref.range's default value.

svn path=/trunk/; revision=41023
2012-02-14 03:24:19 +00:00
Jeff Morriss 045c1d6a1e This dissector calls process_reassembled_data() so there's no need for it to
manually insert the fragment data to the tree (by calling show_fragment_tree());
doing both just means the fragments get added to the tree twice.

svn path=/trunk/; revision=41022
2012-02-14 02:57:48 +00:00
Jeff Morriss 0cb2500e45 There's no need to get the parent of an item we're passing into
proto_tree_move_item(): that function will expects the item, not its parent.

This avoids dissector bugs such as the one reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6768 :

** (process:745): WARNING **: Dissector bug, protocol RTP, in packet 82:
proto.c:4273: failed assertion "fixed_item->parent == tree"

svn path=/trunk/; revision=41021
2012-02-14 02:43:58 +00:00
Anders Broman ce751db87c From Pascal Quantin:
fixes for dissection of Traffic Flow Template IE.

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

svn path=/trunk/; revision=41020
2012-02-13 22:46:12 +00:00
Anders Broman 30b48c875c Handle piggybacked messages.
svn path=/trunk/; revision=41019
2012-02-13 22:22:29 +00:00
Jeff Morriss 1122e906e6 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6817 :
Make the IPP dissector a 'new-style' dissector that does not accept packets
which are clearly not IPP.

This is useful when a user points their web browser at a CUPS server--which
causes the CUPS server to spit out a nice looking web page from which you can
administer the server and/or printers but which up until this fix caused the
IPP dissector to mark the packet as malformed.

svn path=/trunk/; revision=41018
2012-02-13 20:56:40 +00:00
Jörg Mayer e884926644 Start itemizing.
svn path=/trunk/; revision=41011
2012-02-13 09:13:37 +00:00
Guy Harris 8a4786bd90 In a loop of the form
for (i = 1; i <= N; i++)
		...

the type of "i" must have, as its maximum value, a value >= the maximum
value of N; otherwise, if N is equal to the maximum value that fits in
"i", the loop willnever terminate.  (If that requires "i" to be larger
than you'd like, do the loop as

	for (i = 0; i < N; i++)
		...

which doesn't have that problem.)

Clean up the "i = 1" clause's white space in those for loops.

svn path=/trunk/; revision=41010
2012-02-13 05:35:20 +00:00
Jeff Morriss 21a422463e If WIRESHARK_ABORT_ON_DISSECTOR_BUG is set (in the environment) and we put more
than MAX_TREE_ITEMS in the tree, abort() out rather than throwing an exception.

svn path=/trunk/; revision=41009
2012-02-13 03:14:46 +00:00
Guy Harris 1f971df298 Close parentheses in expert info.
svn path=/trunk/; revision=41002
2012-02-12 20:44:51 +00:00
Guy Harris f36fec7381 Don't trust the pointer value in a packet; it could be invalid, and this
could cause an unsigned length value to be reduced by more than its
value, turning it into a very large value.

I couldn't exactly reproduce bug 6833, but it was due to an attempt to
allocate 4294967110 bytes, and this bug caused remaining_len to equal
4294967110, and it would try to create a reassembled packet tvbuff of
that size, so I'm guessing this fixes 6833.

svn path=/trunk/; revision=41001
2012-02-12 20:03:37 +00:00
Alexis La Goutte 918a7f858b Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41000
2012-02-12 19:30:57 +00:00
Alexis La Goutte 3f9b521121 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40999
2012-02-12 19:26:53 +00:00
Alexis La Goutte 26eebbc768 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40998
2012-02-12 19:24:38 +00:00
Alexis La Goutte 9806283d4c Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40997
2012-02-12 18:06:37 +00:00
Alexis La Goutte 7ed5d356b4 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40996
2012-02-12 18:05:50 +00:00
Alexis La Goutte e86788796e Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40995
2012-02-12 18:05:22 +00:00
Alexis La Goutte dfb7f8dd19 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40994
2012-02-12 18:05:02 +00:00
Alexis La Goutte 958afd725d Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40993
2012-02-12 18:04:26 +00:00
Alexis La Goutte e24afc8f39 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40992
2012-02-12 18:03:17 +00:00
Alexis La Goutte 6718c41bd4 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40991
2012-02-12 18:02:58 +00:00
Alexis La Goutte da79574838 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40990
2012-02-12 18:02:39 +00:00
Alexis La Goutte da053ea8d3 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40989
2012-02-12 17:47:11 +00:00
Alexis La Goutte f296d389b2 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40988
2012-02-12 17:46:57 +00:00
Alexis La Goutte a34db114cc Enhance BGP Notification message
* Make field filterable (3 proto_tree_add_text less ! but there are still 147 proto_tree_add_text...)
* Remove bgp_notify struct
* Use expert info to display a unknown error type

svn path=/trunk/; revision=40987
2012-02-12 17:41:57 +00:00
Gerald Combs dbb3d008ae [Automatic manuf, services and enterprise-numbers update for 2012-02-12]
svn path=/trunk/; revision=40981
2012-02-12 15:03:25 +00:00
Anders Broman c36b0f1b03 From Steve Magnani:
USB: add infrastructure for dissecting class-specific descriptors.

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

svn path=/trunk/; revision=40979
2012-02-12 07:18:05 +00:00
Guy Harris 55140956e8 Use the length-on-the-network, not the captured length, when deciding
how far to dissect.

svn path=/trunk/; revision=40978
2012-02-11 20:57:26 +00:00
Guy Harris 357ab3c5f7 Don't bail out of a non-heuristic dissector routine just because there's
not enough captured data in the tvbuff.

svn path=/trunk/; revision=40977
2012-02-11 20:37:54 +00:00
Guy Harris 9f116d50cb Get rid of checkapi warning about %hh.
svn path=/trunk/; revision=40976
2012-02-11 20:36:35 +00:00
Guy Harris cd706946e5 mpeg_pat.cur_next_ind looks like a Boolean; make it one. That also
fixes checkapi warnings about its value_string not being properly
terminated (by replacing it with a true_false_string).

svn path=/trunk/; revision=40975
2012-02-11 20:35:03 +00:00
Anders Broman 75de89cd1b From Steve Magnani:
USB: support filtering of isochronous packets via usb.bInterfaceClass.

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

svn path=/trunk/; revision=40973
2012-02-11 16:59:38 +00:00
Anders Broman 4a0b7db0a2 From Guy Martin:
Dissector for DVB MultiProtocol Encapsulation (DVB-MPE)

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

svn path=/trunk/; revision=40972
2012-02-11 16:52:32 +00:00
Anders Broman 9c731b2015 From Guy Martin:
Dissector for MPEG Program Association Table (PAT)

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

svn path=/trunk/; revision=40971
2012-02-11 16:44:45 +00:00
Anders Broman 3724dbe6b4 From Guy Martin:
Dissector for MPEG section packets.

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

svn path=/trunk/; revision=40970
2012-02-11 16:38:01 +00:00
Anders Broman 8aea738cda Add the abillity to read and write option comments unedited.
This is POC we may want to have more efficient use of the frame data
structure etc. But this allows for work to be done on the GUI to actually add comments.

svn path=/trunk/; revision=40969
2012-02-11 12:34:39 +00:00
Guy Harris 0e2773b633 Don't use 16-bit integers as counters. The code won't be any faster on
anything that can run Wireshark (it might be slower), and if the maximum
count value is 16-bit, you can loop forever if the maximum count value
happens to be 65535.

(Yes, this means that

	guint i, j;

		...

	for (i = 0; i < j; i++)
		...

risks looping forever if j is 2^32-1, and the same applies to 64-bit
counters.  There are probably fewer protocols with 32-bit counts, and
probably even fewer with 64-bit counts, but the way it should be done in
those cases, for safety, is

	i = 0;
	for (;;) {
		if (i >= j)
			break;

		...

		if (i == j - 1)
			break;
	}

or something such as that.)

Fixes bug 6809.

#BACKPORT
Will schedule for 1.6.x.

svn path=/trunk/; revision=40967
2012-02-11 07:12:34 +00:00
Guy Harris c972b866b5 Use C89-style comment rather than C++/C99-style comment.
svn path=/trunk/; revision=40965
2012-02-11 02:45:58 +00:00
Guy Harris 3301c4cb85 Get rid of C++/C99-style comment; use #if 0/#endif instead.
svn path=/trunk/; revision=40964
2012-02-11 02:45:16 +00:00
Guy Harris fd8beeae21 Global variables considered harmful. Pass pinfo along as a parameter;
this appears to fix bug 6823 (the actual crash was a null pinfo being
passed to call_dissector()).

svn path=/trunk/; revision=40962
2012-02-11 02:31:52 +00:00
Ronnie Sahlberg 232c882946 NETLOGON handle different schannel with the same source
ip and dest i

from Matthieu Patou <mat@matws.net>

svn path=/trunk/; revision=40961
2012-02-11 02:10:32 +00:00
Ronnie Sahlberg 4d2cb8bf94 NETLOGON: Fix bugs with netlogon decryption not working in some cases
If there is only one Authenticatex in the file, decryption is not
working.

from Matthieu Patou <mat@matws.net>

svn path=/trunk/; revision=40960
2012-02-11 02:09:20 +00:00