summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-07-03plugins: add cleanup routinescleanup_routinePeter Wu6-26/+40
Destroy the reassembly tables on exit, fix memleak in profinet dissector. Change-Id: Id34dbfde42fe715513997452f87cd4fdc328e294
2015-07-03Split init of misc dissectors into init/cleanup functionsPeter Wu11-82/+60
Convert remaining dissectors to use cleanup routines when possible. (Single-)linked lists require NULL, so do reset their pointers to NULL. Generated with https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=69af86e6c2cf965ba3d7f9636b647b195f0b7d57 (with AUDIT = ALWAYS_EMIT_CLEANUP_CODE = True) Remaining dissectors which did not need further changes: epan/dissectors/packet-aeron.c epan/dissectors/packet-bootp.c epan/dissectors/packet-brdwlk.c epan/dissectors/packet-drda.c epan/dissectors/packet-etch.c epan/dissectors/packet-fix.c epan/dissectors/packet-fw1.c epan/dissectors/packet-lbm.c epan/dissectors/packet-ldss.c epan/dissectors/packet-simulcrypt.c epan/dissectors/packet-spdy.c epan/dissectors/packet-starteam.c epan/dissectors/packet-udp.c Change-Id: Idcacfea6a5de38d40e67db4cdcd0452ad9f9a6a9
2015-07-03Split four more init routines into init/cleanupPeter Wu4-103/+45
Three of them are trivial movements, the smb-sidsnooping is an odd one. Ronnie Sahlberg disabled the sid_name_snooping feature on 9 July 2007. There is a preference to override it though... For now add a TODO marker and ensure that the hash tables are always initialized. Change-Id: I61f5e215c9fa72a6785fb48eaa2d50c1975d7483
2015-07-03ssl,dtls: split init/cleanup routinesPeter Wu4-32/+47
Minor functional change: instead of an empty hash table, now the ssl_session_hash and ssl_crandom_hash structures point will be set to NULL when files are closed. API change: drop the ssl_keylog_file parameter from ssl_common_init, add a new ssl_common_cleanup parameter instead. Change-Id: I65efe71f8347fe9685359f8ed70cfb9673712421
2015-07-03Split more init routines into init/cleanup functionsPeter Wu13-176/+152
This patch is partially automatically generated, but are modified manually. In particular, assignments and function calls have been audited. Some debugging comments and ifdef'd prints have been removed. The lookup tables of the dcm and sip dissectors are now cleared. It is only called on reopening files anyway. The isakmp dissector is modified to use g_hash_table_new_full for destruction of its keys and values. Fix a memleak in ipsec dissector when libgcrypt is not enabled. Generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=3c6128ee266024d164650955f93c7740484abd68 (with AUDIT = True). Change-Id: I3fd910bdee663842ac0196334fe0189b67e251b0
2015-07-03Split init routine into init/cleanup for more dissectorsPeter Wu3-76/+44
This patch converts some dissectors using g_hash_table_foreach_remove. - 9p: drop no-op free func. - nfs: use g_hash_table_new_full such that a destructor function can be used. Drop NULL check since g_free can handle these just fine. - nlm: use g_hash_table_new_full such that a destructor function can be used. Simplify "matched" destruction by replacing the wrapper by a direct g_free call. Change-Id: I455e7f0ad4e47e70dae05af7233fdcdebf583f9f
2015-07-03Call reassembly_table_destroy and move g_hash_table_destroyPeter Wu36-199/+257
This patch moves g_hash_table_destroy calls from the init routine to the cleanup routine. Besides that, the conditional check for the hash table has been removed, assuming that init is always paired with a cleanup call. If reassembly_table_init is found, a reassembly_table_destroy call is prepended to the cleanup function as well. Comments have been removed from the init function as well as these did not seem to have additional value ("destroy hash table" is clear from the context). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4d11f07180d9c115eb14bd860e9a47d82d3d1dcd Manually edited files (for assignment auditing): dvbci, ositp, sccp, tcp. Other files that needed special attention due to the use of register_postseq_cleanup_routine: - ipx: keep call, do not add another cleanup routine. - ncp: remove empty mncp_postseq_cleanup. mncp_hash_lookup is used even if a frame is visited before (see dissect_ncp_common), hence the hash table cannot be destroyed here. Do it in cleanup instead. - ndps: add cleanup routine to kill reassembly table, but do not destroy the hash table as it is already done in ndps_postseq_cleanup. Change-Id: I95a72b3df2978b2c13fefff6bd6821442193d0ed
2015-07-03Call reassembly_table_destroy for some dissectorsPeter Wu49-8/+329
This patch adds reassembly_table_destroy calls as cleanup function for dissectors which have a simple init routine that just calls reassembly_table_init (comments are ignored). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4cc0aec05dc67a51926a045e1955b7a956757b5e (with the if and assignment parsers disabled). The only difference from the autogenerated output is that the XXX comments from the init routines in smb-pipe and tds dissectors are kept. Change-Id: I64aedf7189877247282b30b0e0f83757be6199e7
2015-07-03asn1: split off cleanup routinesPeter Wu34-251/+307
General approach: 1. Split allocation (e.g. g_hash_table_new) from deallocation (g_hash_table_destroy) into functions named "init" and "cleanup". 2. Remove guards that test whether the hash tables are set as init is always called before cleanup. 3. Remove setting hash tables to NULL after destruction. 4. Copy register_init_routine function call and change init to cleanup. 5. Add cleanup function that calls reassembly_table_destroy if there is a reassembly_table_init function. Some templates were modified as follows: - snmp: split renew into init+cleanup, but keep renew for the uat_new callback. - ldap,ros: Rename init to cleanup as there was no initialization. - camel: remove init function from header, make it static. Remove debug print. - tcap: remove unused ssn_range assignment. Files in epan/ were regenerated using cmake && make asn1 Change-Id: Idac16ebf0ec304e0c8becaab5d32904e56eb69b9
2015-07-03packet: add cleanup routines supportPeter Wu3-20/+30
Currently reassembly tables are not freed on shutdown. This makes memleak debugging more difficult due to noise. Support cleanup routines that can do smarter things. After this change, "init" routines are not called anymore when closing files. Further changes should split init routines to cleanup routines as needed. Change-Id: Ib0b2cef6dd9c16905259063ac2c2fdfb7e066be6
2015-07-03bootp: try to fix OSX builtbotMartin Mathieson1-2/+2
Change-Id: I0204b6c947e302a6f38b43593e19c6b816a180a4 Reviewed-on: https://code.wireshark.org/review/9482 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-07-03DHCP: Lookup OUI for TR111 suboption. Also add Ubiquisys OUI to oui_vals.Martin Mathieson3-9/+21
Change-Id: I49b833ee4df01d37cfabb11fd177c00f34f41eb4 Reviewed-on: https://code.wireshark.org/review/9481 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-07-03[smb2] Update some commentsBill Meier1-13/+13
Change-Id: I95dc8743b6db579eb197bd64ab2f26cf43ebc308 Reviewed-on: https://code.wireshark.org/review/9480 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-07-03Move some frame control field #defines to a header and use them elsewhere.Guy Harris3-193/+193
Move a bunch of #defines that involve the frame control field to packet-ieee80211.h and have the WLAN statistics tap use them rather than hardcoded numbers. Change-Id: I893cc50e546af67c910755357cefd86c39a1c783 Reviewed-on: https://code.wireshark.org/review/9476 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-03Fix address resolution for columns.Guy Harris5-69/+80
Have address_to_name() be a routine that takes an address and returns a string with a "sufficiently long" lifetime for use in columns, using the address type's addr_name_res_str routine for most address types, rather than having a too-small set of address types wired into it. It replaces both the internal solve_address_to_name() routine and get_addr_name(), and can, for example, handle the special WLAN address types rather than leaving them unresolved even with an ethers file. Change-Id: Id09bc412adf5d2752155650a14a77c5378af2e42 Reviewed-on: https://code.wireshark.org/review/9475 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-02LLDP: fix dissection of Power Class fieldPascal Quantin1-1/+11
Bug: 11330 Change-Id: I865fe694706606c091a32f58a35658800a9dacc6 Reviewed-on: https://code.wireshark.org/review/9473 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02Add proper "Decode As" mechanism for NFS file handles instead of preference.Michael Mann1-89/+71
Change-Id: I8509b9290a7255a91fa5f10a8312ca80eb94ead6 Reviewed-on: https://code.wireshark.org/review/7900 Reviewed-by: Cal Turney <cturney@charter.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02PEEKREMOTE: ensure to initialize mandatory fields in info_11ac structurePascal Quantin1-0/+5
Bug: 11326 Change-Id: I5a438bda7448f6b6b9959bdc03b0252b3cf22697 Reviewed-on: https://code.wireshark.org/review/9469 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-02Remove more unnecessary null checks.Guy Harris1-14/+4
These routines are called from dissect_bthci_evt(), which ensures that bluetooth_data is non-null, and passes that non-null value to the routines. Should fix CIDs 1306908 and 1306911. Change-Id: Ie25de02f36bda9a9ae25ced034e758fc7f745681 Reviewed-on: https://code.wireshark.org/review/9472 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-02Remove check for null bluetooth_data.Guy Harris1-8/+3
It's guaranteed to be non-null at that point. as noted by Coverity. Should fix CID 1306904. Fix indentation while we're at it. Change-Id: I414844e9b6f9f01e215f42ba087a56b0544d289a Reviewed-on: https://code.wireshark.org/review/9471 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-02Interpret reserved fields netscaler header.anilkumar9111-0/+35
Change-Id: I64d6ae733bda880f5afbe1a755799823d835bfa4 Reviewed-on: https://code.wireshark.org/review/9466 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02Zero out the nss array when we don't have the 802.11ac information we need.Guy Harris2-0/+6
Change-Id: I576be8c1a1badf6befe90a226f83e8d03f8326a7 Reviewed-on: https://code.wireshark.org/review/9470 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-02ixveriwave: fix what seems to be a copy/paste errorPascal Quantin1-1/+1
Change-Id: I79fc9b11fcdd54e0644d01b34a7f37644c85ad0f Reviewed-on: https://code.wireshark.org/review/9468 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-02RPC: do not add a protocol without dissection function to the dissector tablePascal Quantin1-1/+1
This seems to be a typo Bug: 11327 Change-Id: I0182003b77f0deba9421002f5626175af30125f5 Reviewed-on: https://code.wireshark.org/review/9467 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02Try to fix: warning C6244: Local declaration of 'airpcap_if_list' hidesAndersBroman10-36/+36
previous declaration. Change-Id: Id0c3b74ac52c427d9c1efdf749dc410bc5bb450f Reviewed-on: https://code.wireshark.org/review/9460 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02Do not try to display a value_string for FT_FRAMENUM typePascal Quantin2-2/+2
The hfinfo->strings pointer is used to store a ft_framenum_type_t Bug: 11325 Change-Id: Ia6ee1bdd4f1e6ff93907e6107fcecab56c0320de Reviewed-on: https://code.wireshark.org/review/9458 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02Update Debian symbols for recent packet API additions.Michael Mann1-0/+1
Change-Id: Ib6e5a48fa0b0802c920e68d3dc7d62362818d36b Reviewed-on: https://code.wireshark.org/review/9465 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-02Update libwireshark0.symbolsAndersBroman1-1/+52
Change-Id: I04cdba9633d3fc131ecd9dc218bc6dd458378a35 Reviewed-on: https://code.wireshark.org/review/9464 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02Try to fix OSX build bootAndersBroman1-4/+4
lemon.c:1784: warning: implicit conversion shortens 64-bit value into a 32-bit value lemon.c:1790: warning: implicit conversion shortens 64-bit value into a 32-bit value 1790: warning: implicit conversion shortens 64-bit value into a 32-bit value 1928: warning: implicit conversion shortens 64-bit value into a 32-bit value 2707: warning: implicit conversion shortens 64-bit value into a 32-bit value Change-Id: Ief1b64009891de6885c2c9a6cb0e290752de889f Reviewed-on: https://code.wireshark.org/review/9463 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02opcua dissector: Add DefaultXml encoding IDsHannes Mezger2-4/+163
Currently only DefaultBinary encoding IDs can be displayed, this commit adds the DefaultXml encoding IDs Change-Id: I19f3693d3aa03451655058770383222c3828b570 Reviewed-on: https://code.wireshark.org/review/9442 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-02Have RPC dissector use real dissector tables for its subdissectors instead ↵Michael Mann36-158/+139
of a "homegrown" method. Change-Id: I06d7d4e9747ed8593cf40506cae3a09ae237846b Reviewed-on: https://code.wireshark.org/review/9456 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02Add support for a "custom" dissector table. This allows for a "custom" (not ↵Michael Mann2-0/+115
UINT or string) key to register dissector handles. This was designed for RPC dissectors, but probably has use elsewhere. Change-Id: I1bca6b50ba312129a0c4fad5cc3c18cd9297c217 Reviewed-on: https://code.wireshark.org/review/9455 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02Have RPC program hash table use native gtk hash functions.Michael Mann3-54/+22
Change-Id: Ie3c6daf69a1ac155ac09794a5ec87c89bbf0607d Reviewed-on: https://code.wireshark.org/review/9454 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02Replace RPC "dissect_function_t" function signature with "new style" ↵Michael Mann30-895/+1091
dissector function signature. This paves the way for using dissector tables. Change-Id: I88ac165ef9aa5bf5c05e1115f7321e18e734d683 Reviewed-on: https://code.wireshark.org/review/9453 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02Lemon: Update lemon toolsAlexis La Goutte10-655/+801
Update from SQLite trunk (19 April 2015) Add include <config.h> Fix warning: unused parameter 'argc' [-Wunused-parameter] (using _U_) Fix implicit conversion loses integer precision Fix comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] Fix function declaration isn’t a prototype [-Wstrict-prototypes] Fix warning: old-style function definition [-Wold-style-definition] Fix trailing whitespace Fix use -T for template for epan\Makefile.nmake, epan\dfilter\Makefile.nmake, plugins\mate\Makefile.nmake, plugins\tpg\Makefile.nmake and cmake/modules/UseLemon.cmake Fix -Wmissing-prototypes Remove unused function (acttab_free) Add basename the filename with only filename (no path...) Fix lemon.c:3435: warning: implicit conversion shortens 64-bit value into a 32-bit value Add "new" version of lempar.c (3 November 2009). LEMPAR: fix trailing whitespace LEMPAR: fix -Wunused-parameter Change-Id: I2df7e39c9a6846de26743a981fb76aca423fe813 Reviewed-on: https://code.wireshark.org/review/6502 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02opcua dissector: Fix display of status code in error messageHannes Mezger1-1/+1
Instead of just displaying the hex representation, use parseStatusCode which adds the textual representation of the status code Change-Id: I43b9ff846ef48d727e77cfa247b9dcea7061bbab Reviewed-on: https://code.wireshark.org/review/9441 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-02Revert "SMB2 - An out-of-order entry in smb2_ioctl_vals[] causes run-time ↵Alexis La Goutte1-5/+0
error." This reverts commit b591f07273f4e055a286ca36b6fda5da99952b5d. Change-Id: I73e7b6a8ea37b1d5869e785633b74c89d7476b54 Reviewed-on: https://code.wireshark.org/review/9457 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-07-02SMB2 - An out-of-order entry in smb2_ioctl_vals[] causes run-time error.cturney1-0/+5
In value string table "smb2_ioctl_vals[]" of packet-smb2.c {0x0011C017, "FSCTL_PIPE_TRANSCEIVE" } was placed before {0x00110018, "FSCTL_PIPE_WAIT"} which causes "Extended value string 'smb2_ioctl_vals[]' forced to fall back to linear search: entry , value 0x00110018 < previous entry, value 0x0011C017" Change-Id: I99afe5aa12c031e90bb0bd4c8e8aadfffad0135d Reviewed-on: https://code.wireshark.org/review/9449 Reviewed-by: Cal Turney <cturney@charter.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-07-02Fix Buffer overrun while writing to 'airpcap_dir_utf16': the writableAndersBroman1-2/+2
size is '520' bytes, but '1042' bytes might be written. Change-Id: Ic88bc977011eff9ae3c2a4a5ba717e78dbb1171c Reviewed-on: https://code.wireshark.org/review/9452 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02Try to fix warning C6340: Mismatch on sign: 'short' passed as _Param_(2) ↵AndersBroman1-1/+1
when some unsigned type is required in call to 'printf'. Change-Id: I3076454502e1c98ac225d33d520be5bbe5172c2a Reviewed-on: https://code.wireshark.org/review/9451 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-02fixed spelling errors in Omron FINS packet dissectorPatrick1-3/+3
Change-Id: I7cce1769d3e3c2c70d18e247b1e1040b05715c20 Reviewed-on: https://code.wireshark.org/review/9448 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-01PMPROXY: avoid doing an invalid memory access when no token was foundPascal Quantin1-6/+7
Bug: 11320 Change-Id: Ie1fd3f1060e13cf742923aadebe375da4389422a Reviewed-on: https://code.wireshark.org/review/9447 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-01Give instructions for installin Chcocolatey's Win flex-bison.Guy Harris1-1/+8
Fix a typo ("and and") while we're at it. Change-Id: Ib68bbdf0b358f56b36cf53906f105c5ee6493ec4 Reviewed-on: https://code.wireshark.org/review/9446 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-01NAS EPS: upgrade dissector to v12.9.0Pascal Quantin1-3/+3
Change-Id: Ic1fa22dee21b71b523ba5fcfc1ea1bf4c8029e6f Reviewed-on: https://code.wireshark.org/review/9445 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-013GPP NAS: upgrade dissector to v12.10.0Pascal Quantin2-4/+34
Change-Id: Ia89e49d098f86450245c73c4d06a4359a25e3d53 Reviewed-on: https://code.wireshark.org/review/9444 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-01Sort smb2_ioctl_vals[] numerically.Guy Harris1-1/+1
Change-Id: I2d5fd1c640d3ac6fa60d84f2b8080eb7866b2641 Reviewed-on: https://code.wireshark.org/review/9443 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-01add WERR_INVALID_STATE & WERR_TIMEOUTGregor Beck1-0/+2
Change-Id: Ie42cca588c9d5e02279083817382ac77f4ed74d6 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-on: https://code.wireshark.org/review/9439 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-01add function guid_cmp() to compare guidsGregor Beck2-0/+18
Change-Id: I6e34bcfb2205c1647e82dd396a13b0957532c4ae Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-on: https://code.wireshark.org/review/9438 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-01smb2: dissect FSCTL_PIPE_WAITGregor Beck1-0/+41
Change-Id: Iec4fe90d792f745d8c754afc9b18ca6f7a708caa Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-on: https://code.wireshark.org/review/9437 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-01opcua dissector: Fix parsing of 7 byte numeric service NodeIds.Gerhard Gappmeier1-2/+2
The service NodeIds of OPC UA are normally encoded as 4 byte numeric NodeId. However, it is technically also possible to encode these as (less efficient) 7 byte numeric NodeId. This kind of NodeId was already implemented, but wrong. Since then no one ever used this kind of NodeId for service NodeIds. Change-Id: I8654d969604e18bce8415931e455632e72d578ef Reviewed-on: https://code.wireshark.org/review/9435 Reviewed-by: Anders Broman <a.broman58@gmail.com>