Commit Graph

149 Commits

Author SHA1 Message Date
Martin Mathieson 407b707e1f check_typed_item_calls: filter out some false positives 2023-01-29 18:39:20 +00:00
João Valverde bd0102fc64 LDAP: Validate DNS name string encoding 2022-10-20 12:03:52 +00:00
John Thacker b80cdaa243 libgcrypt: Require version 1.8.0
Libgcrypt 1.8.x is required for a large amount of decryption
support and is the current LTS version of libgcrypt. The 1.6 and
1.7 series have been end-of-life since 2017-06-30 and 2019-06-30,
respectively.

The Linux distributions that have versions of libgcrypt before 1.8.0
are nearing or at end of support (RHEL7, SLES 12, Debian stretch,
Ubuntu 16.04LTS) and can be supported by the Wireshark 3.6 LTS release
series.

Remove an enormous amount of ifdefs based on libgcrypt versions
1.6.0, 1.7.0, and 1.8.0. There will be a second pass for the
commons defines HAVE_LIBGCRYPT_AEAD, HAVE_LIBGCRYPT_CHACHA20, and
HAVE_LIBGCRYPT_CHACHA20_POLY1305, which are now always defined.

The ISAKMP dissector has some comments noting that some workarounds
were used for libgcrypt 1.6 that aren't needed with 1.7; perhaps
that could be updated now.
2022-04-20 21:30:21 -04:00
João Valverde 8efad466c4 Tools: Fix fix-encoding-args.pl ASCII string validation
Do not require a useless ENC_NA parameter for string encodings.
FT_STRING and FT_STRINGZ types don't have any ndianness.

Follow-up to 6ec429622c.
2022-02-15 11:38:16 +00:00
Stefan Metzmacher 833a825c7c packet-dcerpc-netlogon: use SEC_CHAN_* values from packet-dcerpc-misc
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-02-08 10:45:21 +00:00
Stefan Metzmacher c9e1c2cf4e Revert "NTLMv2 dissector: skip target info for AUTHENTICATE_MESSAGE"
This reverts commit e8e6a2c6df.

This introduced regression of skipping valid target_info blobs.

The next commit will fix
https://gitlab.com/wireshark/wireshark/-/issues/17817
in a better way.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-02-01 21:23:48 +00:00
Armin Felder e8e6a2c6df NTLMv2 dissector: skip target info for AUTHENTICATE_MESSAGE
if the NTLMv2 Message is of type AUTHENTICATE_MESSAGE,
there are no target fields, according to MS-NLMP 2.2.1.3,
Fixes #17817
2021-12-31 14:44:00 +00:00
David Perry 34ee3cbc48 Change some `wmem_packet_scope()` to `pinfo->pool`
As requested [here][1], help with replacing calls to
`wmem_packet_scope()` with references to `pinfo->pool`.

My principles were:

* Plugins chosen semi-randomly.
* When a calling function already has a `pinfo` argument, just use that.
    * Remove `_U_` from its signature if it was there.
* Don't go more than 2 or 3 levels deep of changing signatures.
* If a function is clearly allocing memory to return, change the
  function signature to take a `wmem_allocator_t *`. Otherwise, either
  that or take a `packet_info *` as seems to make sense.
* No mention of `wmem_packet_scope()` should remain in the files I've
  touched.
    * I didn't always succeed at this, but I made a dent.

[1]: https://www.wireshark.org/lists/wireshark-dev/202107/msg00052.html
2021-07-29 01:36:01 +00:00
Evan Huus 8ee8808876 First pass pinfo->pool conversion, part 2
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.
2021-07-21 09:54:57 -04:00
João Valverde dcc02b1003 dissectors: Replace g_log() with ws_log() 2021-06-16 12:50:28 +00:00
João Valverde 01144f9109 Fix a maybe-uninitialized warning with -O3 (gcc)
GCC 11.1.0.

./epan/dissectors/packet-dcerpc-netlogon.c: In function ‘dissect_secchan_verf’:
../epan/dissectors/packet-dcerpc-netlogon.c:8162:13: error: ‘digest’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 8162 |     guint64 digest;
      |             ^~~~~~
2021-05-20 03:00:21 +01:00
Martin Mathieson 4a4e50992a More spelling fixes, start of second pass of dissectors.
Now easier to find errors due to script improvements and more complete
dictionary file.
2020-08-30 22:34:34 +01:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Stefan Metzmacher a9634ab5a0 packet-kerberos: add dissection of PAC_DEVICE_INFO
Change-Id: I81a3d76e445fa59580f0e95e451092dc526f017d
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/37268
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-21 16:57:01 +00:00
Stefan Metzmacher 5cb8343fb9 packet-dcerpc-netlogon: dissect and verify NETWORK_LOGON messages
We try to dissect the NTLMv2 blob and
verify the nthash against our keytab.

Change-Id: Ia33e91bcd89f72e7468f61756f0eafe9df92356d
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36406
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-16 10:37:39 +00:00
Stefan Metzmacher c67b8c4f29 packet-dcerpc-netlogon: remove unused '#ifdef HAVE_KERBEROS'
get_md4pass_list() is always available, it just returns 0
if HAVE_KERBEROS is not available.

Change-Id: I7fd8613b48c5b02f8693fa6ee15f5f38ed10643e
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36447
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-03-16 08:30:34 +00:00
Stefan Metzmacher e091ee5212 packet-dcerpc-netlogon: add expert info to dissect_secchan_verf()
It's good to see where the session key for decryption was learned.

Change-Id: I2c18c6367eb60796744a3a4d4330244493c29688
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36405
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-14 22:27:50 +00:00
Stefan Metzmacher 44c923737f packet-dcerpc-netlogon: add expert info for NetrServerAuthenticate*
It's useful to see which keys where used, if we have a keytab to
verify things!

Change-Id: I77d887cd28b8ebe57c6c897797b0ab320a390699
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36404
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-14 22:27:40 +00:00
Stefan Metzmacher b26ea6eab2 packet-dcerpc-netlogon: let NetrServerAuthenticate use common code
By passing a real int version to
netlogon_dissect_netrserverauthenticate023_reply() it can also
handle NetrServerAuthenticate instead of only
NetrServerAuthenticate2 and NetrServerAuthenticate3.

Change-Id: Icb3aa3aee52a844b3c34c4bce8b7b3a65f0bdae7
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36403
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-14 19:51:38 +00:00
Stefan Metzmacher 14c71587ef packet-dcerpc-netlogon: make use of get_md4pass_list() from packet-ntmssp
Change-Id: Ide0dd6464a72640c03ad00a9a5a00c5f73d13299
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36402
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-14 15:50:30 +00:00
Stefan Metzmacher 6afa37bb1a packet-dcerpc: pass down header/trailer for hdr_signing
Change-Id: I1d14ffe928e1b303eee7e95a45a9617ffcfb151b
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35707
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-22 21:06:57 +00:00
Stefan Metzmacher 9483fbcbf4 packet-dcerpc-netlogon: relax the data model for netlogon_auth_key
This is a change into the correct direction and allows decryption
even if DCERPC security context multiplexing is not used.

The final design is added as comment, which would make it possible
to do decryption in all cases allowed by the protocol.

Change-Id: Ided40e0028967f2a047bf2722e627800ca77054d
Reviewed-on: https://code.wireshark.org/review/35680
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-08 07:30:36 +00:00
Dario Lombardo b6b7065b7c dcerpc-netlogon: fix compilation with older gcrypt versions.
GCRY_CIPHER_MODE_CFB8 has been introduced in gcrypt 1.8.0:
https://abi-laboratory.pro/?view=changelog&l=libgcrypt&v=1.8.0

Add conditional compilation code for older versions.

Change-Id: I756cc118fce261a6e1a580f4a6a244c8ff0b381f
Reviewed-on: https://code.wireshark.org/review/35678
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-07 16:52:24 +00:00
Stefan Metzmacher f779835844 packet-dcerpc-netlogon: implement NETLOGON_FLAG_AES decryption
Change-Id: I2ff05f528fe8c3ab6f5407c0289064b62f3f0202
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35593
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 12:40:24 +00:00
Stefan Metzmacher b00e2834cd packet-dcerpc-netlogon: remove STRONGKEY related processing from get_seal_key()
This won't be needed for NETLOGON_FLAG_AES.

Change-Id: I668bca15ed13e5a2767fa3e39c5cad0d510a8f5d
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35592
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 12:39:58 +00:00
Stefan Metzmacher fe7a0b4b97 packet-dcerpc-netlogon: split out prepare_decryption_cipher[_strong]()
Change-Id: Ie63c2d0311be058c5694245d8576ea75d7e6bc14
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35591
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 12:39:32 +00:00
Stefan Metzmacher 2a8a604a1d packet-dcerpc-netlogon: split out uncrypt_sequence_strong()
Change-Id: Ie58377b319632c74ad61c2df42e690466b5c5608
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35590
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 12:39:04 +00:00
Stefan Metzmacher 371c2d1bd6 packet-dcerpc-netlogon: use the correct NETLOGON_FLAG_AES flag
See [MS-NRPC] 3.1.4.2 Netlogon Negotiable Options, it's
flag W: Supports Advanced Encryption Standard (AES) encryption (128 bit in
8-bit CFB mode) and SHA2 hashing ...

Change-Id: I4b677e1ca1c3b3b9bc47ccc412380cc18659fd5d
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35589
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 12:38:38 +00:00
Stefan Metzmacher 33ea029de0 packet-dcerpc-netlogon: fix the build with DEBUG_NETLOGON
Change-Id: Iab70f2847343f934864cf205569fe64cf9e98d9b
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35588
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-07 12:37:57 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Gerald Combs 8c22c5bade Fix some spelling errors found by Lintian.
Change-Id: If6fc3aab7ad4fc634567121f7b9541bc6f6c5766
Reviewed-on: https://code.wireshark.org/review/30926
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-05 18:58:19 +00:00
Guy Harris 332ec00e25 Use proto_tree_add_item() to add a seconds value.
Change-Id: Idf4e2f30b3709fc2df5d105064a68860e02a6003
Reviewed-on: https://code.wireshark.org/review/28558
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-01 20:18:02 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 16:49:58 +00:00
Pascal Quantin d2016c6a1b RPC Netlogon: do not leak memory each time a hash is generated
Use copy_address_swallow() instead of copy_address().
When inserting the key in the hash map, copy it in wmem file scope.

Bug: 14407
Change-Id: Ida524d314c943f480dd0e1bf44fd0ded01aafaeb
Reviewed-on: https://code.wireshark.org/review/25731
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-12 08:20:16 +00:00
Alexis La Goutte 3baae12c4f dcerpc (netlogon): fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7
Change-Id: I96b8a8c5157dc89785421282f2c509c100fb0504
Reviewed-on: https://code.wireshark.org/review/20464
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-12 12:13:44 +00:00
erikdejong fe285c640b Replace aes.c and des.c by Libgcrypt
Follow-up of https://code.wireshark.org/review/20095

Rewritten functions:
- crypt_des_ecb

crypt_des_ecb verified against previous crypt_des_ecb implementation with
4294967295 random keys and input buffers from /dev/random as I cannot find a
suitable pcap which uses DES

Change-Id: I21ec2572451e0ded4299ffadd8dd687817bc6318
Reviewed-on: https://code.wireshark.org/review/20429
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-10 02:54:51 +00:00
Erik de Jong f1c75cf6ef Rewrite dissectors to use Libgcrypt functions.
As discussed on the mailinglist, rewriting dissectors to use Libgcrypt
functions as Libgcrypt will be mandatory after change 20030.
Removal of following functions:
- crypt_md4
- crypt_rc4*
- aes_cmac_encrypt_*
- md5_*
- sha1_*
- sha256_*

Further candidates:
- aes_*
- rijndael_*
- ...

Added functions:
- ws_hmac_buffer

Added const macros:
- HASH_MD5_LENGTH
- HASH_SHA1_LENGTH

Changes on epan/crypt/* verified with captures from
https://wiki.wireshark.org/HowToDecrypt802.11
Changes on packet-snmp.c and packet-radius.c verified with captures from
https://wiki.wireshark.org/SampleCapture
Changes on packet-tacacs.c verified with capture from
http://ccie-in-3-months.blogspot.nl/2009/04/decoding-login-credentials-regardless.html

Change-Id: Iea6ba2bf207cf0f1bf2117068fb1abcfeaafaa46
Link: https://www.wireshark.org/lists/wireshark-dev/201702/msg00011.html
Reviewed-on: https://code.wireshark.org/review/20095
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-02 23:58:05 +00:00
Michael Mann 577d21e35c GHashtable -> wmem_map conversions
Many of the register_init_routine/register_cleanup_routine functions
are for initializing and cleaning up a GHashtable.
wmem_map_new_autoreset can do that automatically, so convert many
of the simple cases.

Change-Id: I93e1f435845fd5a5e5286487e9f0092fae052f3e
Reviewed-on: https://code.wireshark.org/review/19912
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-02 13:46:03 +00:00
Guy Harris 5aacafba8e Handle -K, -n, -N, and -u in the common dissection option code.
Also update tfshark to use that code.

Change-Id: Ic03fb8ff48c8bfc460298d180b436e53f0076cbe
Reviewed-on: https://code.wireshark.org/review/18588
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-31 05:05:50 +00:00
Alexis La Goutte da63bcdc76 netlogon (DCERPC): fix build error unused parameter when don't have KERBEROS lib
Reported by Uli https://www.wireshark.org/lists/wireshark-dev/201604/msg00172.html and Benjamin https://code.wireshark.org/review/#/c/14971/

Use fix proposed by Guy https://www.wireshark.org/lists/wireshark-dev/201604/msg00176.html

Change-Id: I4ca4fc3b9a9b52217f2675cb968125d97d94ed2e
Reviewed-on: https://code.wireshark.org/review/15036
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Uli Heilmeier <openid@heilmeier.eu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-22 21:32:14 +00:00
Pascal Quantin 9abbf8b69d Do not mix wmem and glib allocators
Change-Id: I0e845668a1b9dbec93ea920a8585ecfe60f001d1
Reviewed-on: https://code.wireshark.org/review/15044
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-22 04:32:32 +00:00
Alexis La Goutte 3c1f71e0aa netlogon (DCERPC): fix 'tvb/offset...' was marked unused but was used [-Werror,-Wused-but-marked-unused]
Change-Id: Ibf4921fe15938fe763dd0023f09ee48c8527bd26
Reviewed-on: https://code.wireshark.org/review/14971
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-18 11:24:28 +00:00
Guy Harris b9fb2ceb88 Add heuristic dissectors for the variable part of COTP CR and CC PDUs.
Add tables for heuristic dissectors, and add dissectors for the stuff
Microsoft puts there for RDP; they're violating the COTP spec, but I
guess they're stuck because they're using TP0, which doesn't support
user data.

While we're at it, add variants of proto_tree_add_bitmask() and
proto_tree_add_bitmask_flags() that return the bitmask, for use by
callers.

A side-effect of the change is that the proto_tree_add_bitmask routines
no longer treat the encoding as a Boolean, so we have to pass
ENC_LITTLE_ENDIAN or ENC_BIG_ENDIAN, not just some non-zero or zero
value.  Do so.

Rename ositp_decode_CC() to ositp_decode_CR_CC(), to note that it
decodes both CR and CC PDUs.

Bug: 2626
Change-Id: If5fa2a6dfecd9eb99c1cb8104f2ebceccf1e57c2
Reviewed-on: https://code.wireshark.org/review/13648
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-01 23:20:12 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.

Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:41:28 +00:00
Evan Huus cda450ed59 Fix address hashing broken in g4f39c60
We actually have to *use* the return value of the method, which the macro did
for us.

Change-Id: I240ca7e526a18054fe39c6c4ded902998dc2fef0
Reviewed-on: https://code.wireshark.org/review/12389
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-12-03 02:00:18 +00:00
Gerald Combs 4f39c603c2 More ADDRESS macro to address function conversions.
Replace remaining calls to SET_ADDRESS, CMP_ADDRESS, ADDRESSES_EQUAL,
COPY_ADDRESS, and COPY_ADDRESS_SHALLOW with their lower-case
equivalents.

Replace all ADD_ADDRESS_TO_HASH calls with add_address_to_hash.

Change-Id: I4cff857d7a84085abe0bccd52d2605d2a468bf6f
Reviewed-on: https://code.wireshark.org/review/11229
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-24 01:44:24 +00:00
Gerald Combs 86fe2be4dc Use address functions instead of ADDRESS macros in asn1 and epan
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case
equivalents in the asn1 and epan directories.

Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4
Reviewed-on: https://code.wireshark.org/review/11200
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22 11:45:56 +00:00
Peter Wu 126e02cd58 Call reassembly_table_destroy and move g_hash_table_destroy
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
Reviewed-on: https://code.wireshark.org/review/9223
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:35:14 +00:00
Evan Huus 958cef5d68 Remove more deprecated tvb_length
Change-Id: Iac23a6c804ad3720d37186559477909b2ff33eb2
Reviewed-on: https://code.wireshark.org/review/9042
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 00:19:41 +00:00
Michael Mann 4d74d0dccd Eliminate proto_tree_add_text from packet-dcerpc-ndr.c and packet-dcerpc-netlogon.c
Change-Id: I65eff9c8087424087a307f18b96a202f0364e371
Reviewed-on: https://code.wireshark.org/review/8714
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-31 21:08:59 +00:00