Commit Graph

39028 Commits

Author SHA1 Message Date
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
Guy Harris 197f7b9c02 TYPE_PAD records can have zero bytes of payload; don't treat them as
errors.

svn path=/trunk/; revision=41030
2012-02-14 22:31:33 +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
Michael Tüxen 68204c94a4 From Anders: Add support for options in the SHB.
From me: Some whitespace changes.

svn path=/trunk/; revision=41026
2012-02-14 17:07:52 +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
Anders Broman d0b4fb05f0 From Sean Bright:
Wireshark crashes after editing interface settings from capture options dialog.

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

svn path=/trunk/; revision=41017
2012-02-13 18:58:14 +00:00
Anders Broman 196e1ab97b Mark an unused parameter.
svn path=/trunk/; revision=41016
2012-02-13 18:50:31 +00:00
Anders Broman 1bc9a08e41 White space changes.
svn path=/trunk/; revision=41015
2012-02-13 17:34:56 +00:00
Anders Broman c7b1aeb5f5 Drop count is 64 bits
svn path=/trunk/; revision=41014
2012-02-13 17:34:15 +00:00
Anders Broman c894108aca Edit packet comments
svn path=/trunk/; revision=41013
2012-02-13 17:33:05 +00:00
Anders Broman 6971302a1b Drop count is 64 bits
svn path=/trunk/; revision=41012
2012-02-13 17:31:54 +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
Jeff Morriss 670120c481 Fix the crash reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6804
For WTAP_ENCAP_ERF files if we find an Extension and/or Multi-Channel header,
ensure that the size of the full pseudoheader is smaller than the packet size
to avoid an underflow and subsequent attempt to allocate a rather large amount
of memory.

svn path=/trunk/; revision=41008
2012-02-13 03:03:03 +00:00
Guy Harris 61c2e0ea40 Do not assume tab stops are set every 4 spaces.
svn path=/trunk/; revision=41007
2012-02-12 23:50:13 +00:00
Jeff Morriss 95c75fb67a Add edit_packet_comment_dlg.h to the source distribution
svn path=/trunk/; revision=41006
2012-02-12 23:17:01 +00:00
Guy Harris 96b89de3e9 Capitalize the "P" in "Packet" in "Add or Edit Packet Comment". Add
"..." after it, as it pops up a dialog box to let you actually type in a
comment.

Add "Add or Edit Packet Comment" to the menubar's Edit menu.

svn path=/trunk/; revision=41005
2012-02-12 23:09:14 +00:00
Michael Tüxen 13beca3bbf Fix debug output.
svn path=/trunk/; revision=41004
2012-02-12 21:56:00 +00:00
Anders Broman ad0df12982 Add a button row.
svn path=/trunk/; revision=41003
2012-02-12 21:15:11 +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
Michael Tüxen 8aa280b721 Get it compiling.
svn path=/trunk/; revision=40986
2012-02-12 16:38:47 +00:00
Anders Broman 15d8fe8baa Get the comment and put it in the textview.
svn path=/trunk/; revision=40985
2012-02-12 16:18:25 +00:00
Anders Broman ff4a624dcf Try to make the buildbot happy.
svn path=/trunk/; revision=40983
2012-02-12 15:48: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 f78145ca9f Add the edit packet comment menu entry and the empty files
to actually handel the menu to edit the comments.

svn path=/trunk/; revision=40980
2012-02-12 14:56:06 +00:00