Commit Graph

81692 Commits

Author SHA1 Message Date
Evan Huus e69446aa55 asn1: convert most dissectors to pinfo->pool
Part 1/2 as the commits were too big for CI.

Largely find/replace, with a few manual tweaks. Then regenerate the asn1
dissector sources and make sure everything still builds. There are a
handful of cases I skipped as too complex, but this covers most of the
asn1 dissectors.
2021-07-26 15:30:11 +00:00
João Valverde 3467b98eb7 CMake: Make LTO default off, restrict to release build
Link Time Optimizations increases build time a lot so restrict
this optimization to release builds. Follow our build bots and
make this option default off.

Also LTO requires CMake >= 3.9 so make the LTO CMake option
universally conditional on that requirement.
2021-07-26 15:13:38 +00:00
João Valverde 925e01b23f Remove duplicate format_size() function
We have two format_size()s, with and without wmem scoped memory.
Move the wmem version to wsutil and add a convenience macro to
use g_malloc()ed memory.
2021-07-26 14:56:11 +00:00
João Valverde 133b0c583f Move epan/wmem/wmem_scopes.h to epan/
This header was installed incorrectly to epan/wmem_scopes.h.

Instead of creating additional installation rules for a single
header in a subfolder (kept for backward compatibility) just
rename the standard "epan/wmem/wmem.h" include to
"epan/wmem_scopes.h" and fix the documentation.

Now the header is installed *correctly* to epan/wmem_scopes.h.
2021-07-26 14:56:11 +00:00
João Valverde 7f9c1f5f92 Move wmem to wsutil
This allows wmem to be used from other libraries, namely wsutil.
It is often the case that a funtion exists in wsutil and cannot
be used with a wmem scope, requiring some code duplication or
extra memory allocations, or vice-versa, code in epan cannot be
moved to wsutil because it has a wmem dependency.

To this end wmem is moved to wsutil. Scope management remains part
of epan because those scope semantics are specific to dissection.
2021-07-26 14:56:11 +00:00
João Valverde 8310665ae7 Normalize some dissector includes 2021-07-26 14:56:11 +00:00
João Valverde 6a619212c3 Resync ASN.1 dissector sources 2021-07-26 14:09:37 +00:00
Martin Mathieson a7b5eec265 check_typed_item_calls.py: check add_bitmask() functions 2021-07-26 10:31:15 +00:00
Guy Harris 92f49886cc dumpcap: clean up capture device open errors.
1) Consistently say "capture device"; not all capture devices are
"interfaces" in the sense of "network interfaces' ("any" means "all
network interfaces", and capturing may be supported on a USB bus or on
D-Bus or....)

2) Use double quotes to quote the device specifier (it probably won't
have spaces in its name, but...).

3) Make sure that there's a space between "capture device" and the
quoted device name.
2021-07-26 01:32:23 -07:00
Gerald Combs 94d7b7846c GitLab CI: Add a retry to the Windows builds.
The Windows runners (Win32 in particular) sometimes time out during
tests. Add a retry.
2021-07-25 22:13:38 +00:00
Guy Harris 436a9fabcb btatt: fix reported dissector bug.
For better or worse, currently, if you have a field that is broken into
bitfields, the top-level field must be integral, so the entire field's
value is shown.  A case could be made that FT_NONE should be supported,
but that's not the case now.

Fixes issue #17505.
2021-07-25 13:56:40 -07:00
Guy Harris cb98aa3730 nettrace 3GPP 32.423: move the name related code together.
Initialize name_str right before we fill it in if the name is present,
and note what we're doing, to make it a bit clearer what the
initializing code is doing.
2021-07-25 13:34:11 -07:00
João Valverde 6ab67e2aa6 wslog: Minor fixes and cleanups 2021-07-25 18:21:31 +00:00
Moshe Kaplan 49ca5fa8ab libwiretap: Avoid using uninit variable
Within wiretap/nettrace_3gpp_32_423.c,
set the first byte of the buffer
to a null byte to avoid potentially
accessing uninitiliazed memory.
Fixes Coverity 1471685.
2021-07-25 17:25:44 +00:00
Gerald Combs 120b4c7e78 [Automatic update for 2021-07-25]
Update manuf, services enterprise numbers, translations, and other items.
2021-07-25 09:29:17 +00:00
Martin Mathieson a975ef7203 check_typed_item_calls.py: Add a check for all-zeroes mask
When the mask value is 0x0, it effectively means there is no
mask, and that all bits count.

Fix found instances and replace them with 0x0.
2021-07-24 10:58:15 +00:00
Gtker c8fa2c461f WOWW: Make undecryptable server messages stop decryption
Since it is (more or less) impossible to know exactly how many messages
are in a PDU we don't know how many times to increment the session key
index, meaning we might decrypt incorrectly.
To prevent this we freeze the decryption of server messages when we meet
an undecryptable message.
2021-07-24 07:42:00 +00:00
Gtker 3ed1fb4ab5 WOWW: Make additional messages appear under the proto subtree 2021-07-24 07:42:00 +00:00
Gtker c27ec08229 WOWW: Add ability to decrypt multiple messages in PDU
Without this the session key gets out of sync and the remaining messages
from that party are "encrypted".
2021-07-24 07:42:00 +00:00
Gtker 5331468770 WOWW: Make headers need decryption tree into map
In the future it will be necessary to index with a 64 bit int instead of
a 32 bit one.
2021-07-24 07:42:00 +00:00
Gtker a8aebb8947 WOWW: Change decrypted headers tree to map
In the future it will be necessary to use a bigger key than 32 bits,
making it easier to use a map instead.
2021-07-24 07:42:00 +00:00
Gtker 5b69cae53d WOWW: Add type for decrypted header 2021-07-24 07:42:00 +00:00
Gtker d5f7f80d7b WOWW: Make tree only take the data that belongs to it
Previously, any remaining data would be highlighted as belonging to the
first opcode.
2021-07-24 07:42:00 +00:00
Gtker 022b4f857f WOWW: Move tree building of headers into seperate function
This will help when dealing with several headers and bodies inside the
same packet.
2021-07-24 07:42:00 +00:00
Gtker 4473fe487f WOWW: Move adding of tree items to be closer to tree logic 2021-07-24 07:42:00 +00:00
Gtker bb6fcfdedb WOWW: Fix allocs with hardcoded values 2021-07-24 07:42:00 +00:00
Gtker db24903e4a WOWW: Refactor decryption logic
This removes unnecessary empty else blocks and makes for easier reading.
2021-07-24 07:42:00 +00:00
Gtker 26bec7e580 WOWW: Refactor header decryption logic slightly 2021-07-24 07:42:00 +00:00
Piotrek Żygieło 6fdcb8f453 Fix duplicated preposition 2021-07-23 21:15:51 +00:00
João Valverde c0ae696253 CMake: Remove some unused definitions 2021-07-23 21:23:00 +01:00
Dr. Lars Völker 8fa1a58e60 DoIP: Add better check of length field
This prevents illegal length field values to trigger asserts in
tcp_dissect_pdus as well as adding expert info for this case.

Closes: #17498
2021-07-23 12:06:08 +00:00
Dylan Ulis e9843baf6c CMS: Correct RFC 4108 Attributes
There was an extra '9' in each of the OIDs. The OIDs were already
correct in CMSFirmwareWrapper.asn (in the same directory)
2021-07-23 08:30:58 +00:00
Dylan Ulis 1be58f3644 CIP Motion: Match spec data naming
1. Move some fields under additional tree nodes, to match the
   struct names in the spec.
2. Parse data in order. Previously, some sections were parsed
   out of order, which is confusing in the tree output.
3. Improve comments/documentation to match wording in the spec
4. Remove temp_data variables and replace with actual names.
2021-07-23 08:15:00 +00:00
Richard Sharpe e2bcdd331a ieee80211: Fix the handling of Ranging NDP Announcements. 2021-07-23 07:40:12 +00:00
Guy Harris b5a442a979 rpcap: add support for IPv6 addresses in findalldevs replies.
Also add support for various old-server-code address family values, and
toss in a big comment explaining the whole findalldevs reply address
mess.
2021-07-22 16:36:36 -07:00
Evan Huus 05e7c6ac59 mp4: handle missing timescale
Avoid various divide-by-zeros when there are durations with no timescale
set. Also fix a rare potential memory leak while I'm here.
2021-07-22 16:35:30 +00:00
Peter Wu 67d37da79a CMake: fix macOS build when both Qt5 and Qt6 are installed again
See v3.5.0rc0-1614-g785657d9b8 for the earlier fix and context.

Fixes: v3.5.0rc0-2496-g9b78a42855 ("CMake: Fixup qtui's includes.")
2021-07-22 13:25:02 +02:00
Alexis La Goutte 8bb7c1933d RADIUS: Update h3c dicto
from FreeRadius Master)
2021-07-22 05:37:52 +00:00
Martin Mathieson a39f31318b eCPRI: don't show UINT32 type of 4-byte hdr subtree. 2021-07-21 19:22:02 +00:00
Jaap Keuter 5c8ec13dfc MKA: Don't just pretend to dissect version 3, implement the addition 2021-07-21 20:28:34 +02: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
Joakim Karlsson 9ed273e5da JSON: correction of 3gpp ueEpsPdnConnection 2021-07-21 13:09:42 +00:00
Martin Mathieson c9a7b4f8ba Add some comments and long text to eCPRI dissector.
Looking at the handover between eCPRI and ORAN FH CUS
dissectors.  Not sure that preference for calling
ORAN and eCPRI's cursory handling of message types
0 and 2 are still appropriate.
2021-07-21 12:53:41 +00:00
Joakim Karlsson 75f53899a9 GTPv2: Add dissect of EN-DC SON Configuration IE in F-Container 2021-07-21 11:49:10 +00:00
Gerald Combs 539ad8a91b CMake: Remove unneeded GLIB2_LIBRARIES.
GLib is part of wsutil's link interface, so we don't need to link to it
explictly.
2021-07-21 10:05:21 +00:00
Guy Harris e8a8fab18c text_import: create a wtap_block_t before calling wtap_block_add_...option.
Those routines can't add an option if there's no block to add it to;
this meant that neither the direction nor the sequence number would be
set when importing a packet.
2021-07-21 00:03:47 -07:00
Evan Huus d6d7dd1e56 First pass pinfo->pool conversion
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.

I also tweaked a few of the docs which got caught up.
2021-07-21 05:38:29 +00:00
Guy Harris ef542759d0 text_import: only add the packet flags if we have them.
If we don't know the packet direction, don't bother adding the packet
flags option.

While we're at it, don't bother casting a guint64 to guint64.
2021-07-20 14:45:52 -07:00
Gtker bb25eca4eb WOWW: Rename 'index' variables to 'idx'
As discussed on the PR:
https://gitlab.com/wireshark/wireshark/-/merge_requests/3707#note_631240408
2021-07-20 20:46:58 +00:00
Gtker 9161ba62eb WOWW: Remove template comments 2021-07-20 20:46:58 +00:00