Commit Graph

127 Commits

Author SHA1 Message Date
Jeff Morriss 217514e565 Remove a couple set-but-unused variables. I *think* the new tree isn't
particularly useful...

svn path=/trunk/; revision=43577
2012-07-05 23:31:17 +00:00
Jakub Zawadzki c7dbc44bf3 Fix bug #7436
offset returned from dissect_nfs_open_claim4, dissect_nfs_openflag4 were different
when we were building tree and where we didn't.
Fix other similar cases.

svn path=/trunk/; revision=43576
2012-07-05 21:09:34 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Alexis La Goutte 566b6e021b Try to fix some Logic error (Function call argument is an uninitialized value ) Warning found by Clang
svn path=/trunk/; revision=42365
2012-04-30 21:54:45 +00:00
Jakub Zawadzki 8ab67b185e Like r42302 but in other place.
Followup to r42283: the loop which allocates operation summaries may not run
to completion, so don't try to free all the operation summaries.

svn path=/trunk/; revision=42303
2012-04-27 20:49:15 +00:00
Jeff Morriss a8a5721d47 Fix fuzz failure reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7209 :

Followup to r42283: the loop which allocates operation summaries may not run
to completion, so don't try to free all the operation summaries.

svn path=/trunk/; revision=42302
2012-04-27 20:43:22 +00:00
Anders Broman 9e506104ed From Evan Huus:
Memory leak in NFS Dissector

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

svn path=/trunk/; revision=42283
2012-04-27 08:24:02 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Jakub Zawadzki 23494db817 Add missing const attribute to some char *
Fix some "assignment discards qualifiers from pointer target type", etc

svn path=/trunk/; revision=41996
2012-04-09 18:44:10 +00:00
Jeff Morriss 17ce01b48d From Weston Andros Adamson via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7010 :
While developing SP4_MACH_CRED support for the linux nfs client, I noticed that
wireshark was displaying these bitmasks incorrectly (as fattrs instead of NFS
operations).

I also noticed that BACKCHANNEL_CTL (a required value in the mask for
SP4_MACH_CRED) wasn't in names_nfsv4_operation[], so I added it and verified
that we're not missing any other ops.

svn path=/trunk/; revision=41851
2012-03-30 17:50:08 +00:00
Bill Meier 2df5dc3d53 From Reinhard Speyerer: Fix several misspellings/typos in Wireshark
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967

svn path=/trunk/; revision=41645
2012-03-18 22:24:24 +00:00
Jeff Morriss 3d98787379 From Weston Andros Adamson via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6919 :
Both deviceid4 and sessionid4 are currently decoded as rpc_opaque_data - this
means their values are never displayed in the "Packet Detail" section and to
see them you have to select the name in the "Packet Detail" section and look at
the byte range in the "Packet Bytes" section.

The attached patch (against today's SVN) adds dissectors for both so these
values are displayed in the "Packet Detail" section.

svn path=/trunk/; revision=41417
2012-03-08 03:57:48 +00:00
Chris Maynard 5debb5c5e3 Fix memory leaks involving tvb_get_string[z]().
svn path=/trunk/; revision=40312
2011-12-28 16:36:57 +00:00
Bill Meier 6c809fc444 In certain cases, don't reference a tvb when displaying a hidden,generated field.
svn path=/trunk/; revision=40208
2011-12-15 16:01:25 +00:00
Bill Meier 13f09ee27f Fix a tvb memory leak;
Essentially: generate tvbuffs as needed; don't save them for later reuse
               with the result they are never freed.

Also:
- move a struct from packet-nfs.h to packet-nfs.c since it's only used locally;
- reformat some long lines.

svn path=/trunk/; revision=40205
2011-12-14 22:01:38 +00:00
Chris Maynard 91398db56b Append each op name to the operations sub-tree so you don't necessarily have to expand the tree to see which ops are present. I think it makes more sense to append the names here rather than at the top level which was done to resolve bug 6078, but for now, I leave them appended in both places.
svn path=/trunk/; revision=39837
2011-11-14 20:38:05 +00:00
Chris Maynard 23193d4747 In the unlikely case that there are no ops, don't append anything. Also, comma-separate them.
svn path=/trunk/; revision=39770
2011-11-08 23:08:12 +00:00
Jeff Morriss f5e838b602 Remove comma at the end of several enumerator lists.
svn path=/trunk/; revision=39700
2011-11-01 01:23:10 +00:00
Alexis La Goutte ece3e6d974 Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39651
2011-10-28 11:20:19 +00:00
Bill Meier 20e3e0b5b5 Fix some proto_tree_add_item() encoding args;
In some files:
 Remove a few unneeded #includes;
 Do some whitespace/indentation cleanup

svn path=/trunk/; revision=39635
2011-10-27 15:59:12 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Stig Bjørlykke 5359494b1f Second try to move crc routines to libwsutil.
This time keep the tvb routines in epan.

Now we can use common crc routines outside epan.

svn path=/trunk/; revision=38810
2011-08-31 09:00:54 +00:00
Stig Bjørlykke 71f903b956 Revert r38800, as the crc routines contains some tvb functions.
svn path=/trunk/; revision=38803
2011-08-30 14:17:40 +00:00
Stig Bjørlykke 4132d40e50 Move all crc routines to libwsutil.
This way we can use the crc routines in wiretap.

svn path=/trunk/; revision=38800
2011-08-30 13:46:42 +00:00
Anders Broman 4b85603c80 From Jeremy Jones:
Add support for decoding NFSv4.1 OP_BIND_CONN_TO_SESSION.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6182

svn path=/trunk/; revision=38306
2011-08-02 05:18:58 +00:00
Bill Meier b17543e2c0 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38049
2011-07-15 19:07:25 +00:00
Stig Bjørlykke 27344a90fe Removed some unneeded assignments.
Found by clang.

svn path=/trunk/; revision=36698
2011-04-18 15:29:25 +00:00
Bill Meier 1667de16c5 Don't assign to a proto_item * if the value won't be used: Coverity 990;
Add some missing code: improves display of "main_opcode" field: Coverity 991, 993 & 994;
Fix bug introduced a while back: "changeinfo4" field details aren't displayed: Coverity 992;
Add missing code so READDIR (V4) details  are shown in a subtree (as presumably was originally intended);
Fix some indentation.

svn path=/trunk/; revision=36525
2011-04-08 20:06:56 +00:00
Stig Bjørlykke 0b8be02229 Use correct length for clientaddr4 callback address entry.
svn path=/trunk/; revision=36411
2011-03-31 11:01:06 +00:00
Ronnie Sahlberg f3512de0a9 remove some assignments we dont use
svn path=/trunk/; revision=36406
2011-03-30 03:39:58 +00:00
Ronnie Sahlberg feaf55330e Coverity 989
Remove some item=  assignments we dont need since we never use the value
of the created item.


svn path=/trunk/; revision=36269
2011-03-22 20:48:36 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier b21ea034b6 Use value_string_ext fcns to access certain value_string arrays;
Sort certain value_string arrays to be in ascending numeric order;
Do minor whitespace cleanup and reformatting of long lines.

svn path=/trunk/; revision=34780
2010-11-04 21:30:42 +00:00
Bill Meier 209109c2fd Define some fcns & vars as static ...
svn path=/trunk/; revision=34458
2010-10-10 20:07:06 +00:00
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Jeff Morriss 381664535b As suggested by Kovarththanan Rajaratnam in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3548 :
Clean up hf fields some more: mostly removing leading and trailing spaces from names and blurbs.

svn path=/trunk/; revision=34165
2010-09-21 03:14:49 +00:00
Jeff Morriss d643e0366a Remove check_col(). Clean up some spacing/indentation too.
svn path=/trunk/; revision=34142
2010-09-17 02:22:37 +00:00
Jeff Morriss f2cfa4e453 From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5197 :
The NFS dissector (all versions) show access types that have not been requested
to be checked as "not allowed" in the call and reply.  This is incorrect and
misleading.  At present one must manually compare what was requested in order
to assess if access was actually denied for that type.  When there are hundreds
or thousands of these ACCESS requests in a capture, it is not possible or
practical to manually check each one.  

The submitted patch does the following:

* Passes the access mask in the call to the reply for comparison
* Adds filterable fields for each supported (v4) and access type
* Adds a pseudo field, nfs.access_denied
* Lists the access types to be checked in the summary and tree
* Separately lists the supported, denied, and allowed access types in the 
  summary and tree

The changes are applied to all NFS versions.


From me: a couple of small changes to make it compile without warnings.

svn path=/trunk/; revision=34141
2010-09-17 02:03:09 +00:00
Gerald Combs 436ab95472 From Cal Turney via bug 5209:
Decode of SETCLIENTID calls in the Windows x86 version fail with "[Dissector
bug, protocol NFS: STATUS_ACCESS_VIOLATION: dissector accessed an invalid
memory address]".  This error occurs in packet-nfs.c in
dissect_nfs_clientaddr4() where vars 'protocol' and 'universal_ip_address' get
stepped on following the call to scanf().  The b1-b10 vars are declared as
quint8.  While "hh" modifier used in the scanf() is documented in Linux to
correspond to an a signed/unsigned char arg, I cannot find a similar
designation in Windows (MSDN). The Windows C compiler interprets %hhu as
corresponding to a int16 rather than int8.

svn path=/trunk/; revision=34115
2010-09-14 15:43:19 +00:00
Bill Meier aa3ba1a1b5 From Alex Burlyga: Make hf_nfs_slotid4 useful again.
"hf_slotid4 is used for all possible slotid fields in sequence op. This patch
 separates them out and makes it useful for filtering."

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

svn path=/trunk/; revision=33601
2010-07-21 01:43:14 +00:00
Gerald Combs 46bd1dac98 Initialize a variable. Fixes bug 5026.
svn path=/trunk/; revision=33596
2010-07-20 17:16:42 +00:00
Gerald Combs 844e3e122a Use sscanf() to parse clientaddr4 instead of trying to parse it
ourselves. Add support for IPv6 addresses. Fixes bug 5019.

svn path=/trunk/; revision=33585
2010-07-19 21:47:51 +00:00
Bill Meier 40c1c5b28b From Ian Schorr: "NFSv4 COMMIT Calls not decoding"
NFSv4 COMMIT Requests are not decoded.  NFS "malformed packet" logic is
tripped.

This was a bug introduced with the changes in bug 4975.  The dissector
erroneously tries to decode 4 bytes past the end of the packet.

A patch is attached that fixes that, as well as adds "Offset" info in the Info
column for COMMIT calls.

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

svn path=/trunk/; revision=33478
2010-07-09 00:23:27 +00:00
Jeff Morriss 4522f9b0a4 Limit the number of operations to 128 (arbitrary number) to keep us from attempting to mallocate way too much memory. This fixes the fuzz failure reported in bug 4976.
svn path=/trunk/; revision=33456
2010-07-06 14:57:54 +00:00
Guy Harris 80c8a18da7 Use G_GINT64_CONSTANT() to make a 64-bit all-bits-set constant.
svn path=/trunk/; revision=33454
2010-07-06 09:51:28 +00:00
Guy Harris 39f85d188c No need to add a fake field with the opcode as a string - you can just
compare the real opcode field against a string.

svn path=/trunk/; revision=33452
2010-07-06 08:43:07 +00:00
Stig Bjørlykke 8f686e8af0 Try checking for G_MAXUINT64 instead of 0xffffffffffffffff.
svn path=/trunk/; revision=33451
2010-07-06 07:45:38 +00:00
Stig Bjørlykke 22056542a8 Fix the build on OSX.
svn path=/trunk/; revision=33449
2010-07-06 06:40:34 +00:00