Commit Graph

82223 Commits

Author SHA1 Message Date
John Thacker 1dd8f3a666 capinfos: Calculate hashes after determining if a capture file
Calculate the hashes for a file after the wtap_open_offline, to avoid
spending time calculating them for files that aren't known capture
formats. We wouldn't print the checksums in those cases anyway,
and the time savings can be considerable on large non-capture files.
2021-10-06 04:38:00 +00:00
Oscar Gonzalez de Dios 7bdfa653a1 PCEP: Added support of draft-ietf-pce-segment-routing-policy-cp-05
added SR Policy Name TLV
added SR Policy Candidate Path Identifiers TLV
added SR Policy Candidate Path Name TLV
added SR Policy Candidate Path Preference TLV
Extended Association ID TLV format for assoc_type 6 included

Removed development comments and formatted code

Association type field values are displayed, according to IANA registered values

fixed filters for extended-association-id TLVs
2021-10-06 04:21:06 +00:00
John Thacker 9ae0d3c4f1 BSSAP: Use VLR number field
For some reason (copy and paste?) the SGSN number field was substituted
for the VLR number field, and then later the latter got commented out
as it was being unused.
2021-10-06 04:04:04 +00:00
Gerald Combs aa41dd9a56 GitLab CI: Restrict our merges to master. 2021-10-06 03:45:55 +00:00
Anders Broman d2dff29c83 NR RRC: Make more PDUs set col and proto. 2021-10-06 03:08:22 +00:00
Gerald Combs 0aae44e145 GitLab CI: Switch to clang 13.
Clang 13 was added to the Ubuntu image in wireshark-containers
e5725506f4.
2021-10-06 00:28:01 +00:00
Gerald Combs 4f4e9bfbc4 Transifex: Update our configuration.
Update our configuration to match recent changes on transifex.com.
2021-10-06 00:04:08 +00:00
Brian Sipos bc3bced07d COSE: Handle indefinite tstr/bstr encodings 2021-10-05 21:11:36 +00:00
João Valverde 39036a0a30 dfilter: Add some more syntax tests 2021-10-05 19:19:36 +01:00
João Valverde 7bf02254c1 dfilter: Rename function production rule
Make it more obvious that entities are also functions.
2021-10-05 19:19:36 +01:00
João Valverde a940318f37 dfilter: Minor grammar fixups
Clean up syntax error code. TEST and SET are never returned by
the tokenizer.

Remove unnecessary range_body() grammar element. Fix a comment.

Move the stnode_token_value() function to its proper place.
2021-10-05 17:56:21 +01:00
João Valverde d45ba348fd dfilter: Strengthen sanity check for range
Allow an entity in the grammar as range body. Perform a stronger
sanity check during semantic analysis everywhere a range is used.
This is both safer (unless we want to allow FIELD bodies only, but
functions are allowed too) and also provides better error messages.

Previously a range of range only compiled on the RHS. Now it can
appear on both sides of a relation.

This fixes a crash with STRING entities similar to #10690 for
UNPARSED.

This also adds back support for slicing functions that was removed
in f3f833ccec (by accident presumably).

Ping #10690
2021-10-05 16:39:41 +01:00
João Valverde f7a2abb4ae dfilter: Don't include type name in 'tostr' output
This makes 'stnode_tostr()' more useful for end-user error reporting.
For debugging purposes we tack on the type name in the debug specific
code instead.
2021-10-05 16:25:36 +01:00
Jaap Keuter b700448745 Eth: Segment routing over IPv6 2021-10-05 13:29:55 +00:00
Stig Bjørlykke 0ca24f01d7 cose: Fix memory leaks
Do not allocate cose_param_key_t in dissect_header_pair(), this may
leak. Use wmem_strdup() to temporary copy a string.

Fixes #17627
2021-10-05 08:18:31 +02:00
AndersBroman 60899ed216 Update README.developer 2021-10-05 05:40:16 +00:00
João Valverde 6898210ded docs: Add section about architecture to README.developer 2021-10-05 05:40:16 +00:00
Gerald Combs f51510f401 IDMP: Fix a string allocation.
protocolID is packet scoped, so it can lead to hilarity if we add it to
the ROS dissector's epan scoped wmem_map. Add an epan-scoped copy of
protocolID instead. Blind attempt at fixing #16342.
2021-10-05 05:15:32 +00:00
Evan Huus f9ac0f40f7 to_str: scope decode_bits_in_field
Mostly straightforward. The only complication was
proto_tree_add_split_bits_crumb which needed some manipulation to
guarantee a non-null tree so we could use its memory scope.

This is one of the last non-dissector uses of wmem_packet_scope!
2021-10-05 04:42:13 +00:00
Piotr Winiarczyk 4661e1ddd9 btmesh: improve scheduler dissection
Add better month and week of day dissections for three messages.
2021-10-05 04:26:10 +00:00
Anders Broman b4cd8c0a8e NR RRC: Register protocols which sets proto and info columns. 2021-10-05 03:48:51 +00:00
Martin Mathieson 79c9e46144 Fix some items where mask was wider than field.
Detected by ./tools/check_typed_item_calls.py --mask

Error: epan/dissectors/packet-asterix.c filter= asterix.021_161_TN 0x0fff with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (0f)
Error: epan/dissectors/packet-capwap.c filter= capwap.control.message_element.ieee80211_station_session_key.flags_a 0x2000 with len is 4 but type FT_BOOLEAN  indicates max of 1 and extra digits are non-zero (200)
Error: epan/dissectors/packet-capwap.c filter= capwap.control.message_element.ieee80211_station_session_key.flags_c 0x1000 with len is 4 but type FT_BOOLEAN  indicates max of 1 and extra digits are non-zero (100)
Error: epan/dissectors/packet-cfdp.c filter= cfdp.trans_stat_2_b 0x6000 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (60)
Error: epan/dissectors/packet-cfdp.c filter= cfdp.suspension_ind_b 0x8000 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (80)
Error: epan/dissectors/packet-ixveriwave.c filter= ixveriwave.tx.factorydebug 0x7f80 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (7f)
2021-10-04 21:58:33 +00:00
Gerald Combs d4c908a573 Revert "TCP: last out-of-order packet is marked as a retransmission"
Manually revert commit 4e3ec2d01a in order to work around a conflict
with 2484ad2f72.
2021-10-04 21:41:37 +00:00
Pascal Quantin 924bb5b8b3 F1AP: upgrade dissector to v16.7.0 2021-10-04 20:48:05 +00:00
Pascal Quantin d6e2dbe407 E1AP: upgrade dissector to v16.7.0 2021-10-04 20:31:05 +00:00
Pascal Quantin 5cf2a61938 XnAP: upgrade dissector to v16.7.0 2021-10-04 20:13:51 +00:00
Pascal Quantin 1292ee5cef NRPPa: upgrade dissector to v16.5.0 2021-10-04 19:57:11 +00:00
Pascal Quantin 8faede569b NGAP: upgrade dissector to v16.7.0 2021-10-04 19:40:15 +00:00
Evan Huus 7b8938474b to_str: pull scope arg up into more addr macros
These three all had pretty minimal usage, so do them together.
2021-10-04 18:27:26 +00:00
Martin Mathieson ef2468662b check_typed_item_calls.py: Flag bits set outside mask
Current errors are:
Error: epan/dissectors/packet-asterix.c filter= asterix.021_161_TN 0x0fff with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (0f)
Error: epan/dissectors/packet-capwap.c filter= capwap.control.message_element.ieee80211_station_session_key.flags_a 0x2000 with len is 4 but type FT_BOOLEAN  indicates max of 1 and extra digits are non-zero (200)
Error: epan/dissectors/packet-capwap.c filter= capwap.control.message_element.ieee80211_station_session_key.flags_c 0x1000 with len is 4 but type FT_BOOLEAN  indicates max of 1 and extra digits are non-zero (100)
Error: epan/dissectors/packet-cfdp.c filter= cfdp.trans_stat_2_b 0x6000 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (60)
Error: epan/dissectors/packet-cfdp.c filter= cfdp.suspension_ind_b 0x8000 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (80)
Error: epan/dissectors/packet-ixveriwave.c filter= ixveriwave.tx.factorydebug 0x7f80 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (7f)
Error: epan/dissectors/packet-opa-snc.c filter= opa.snc.rhf.eccerr 0x200000000 with len is 9 but type FT_BOOLEAN  indicates max of 8 and extra digits are non-zero (2)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.rdacc 0x0100 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (01)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.wracc 0x0200 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (02)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.reloadacc 0x0400 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (04)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.crcerr 0x0800 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (08)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.lderr 0x1000 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (10)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.cmderr 0x2000 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (20)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.wrerr 0x4000 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (40)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.busy 0x8000 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (80)
2021-10-04 18:07:28 +00:00
Darius Davis 9bf24deb2d WSDG: Trivial cleanups.
Fix a bogus URL in a comment in the asn2wrs documentation.

Switch a backslash in the Unix Quick Setup instructions to a slash.

Insert commas in two places where they are needed.
2021-10-04 17:49:11 +00:00
Evan Huus e578c6caee to_str: pull scope arg up into tvb_ether_to_str
There are a bunch of near-identical macros here, but I'm gonna change
one at a time or else the builder times out at the number of files
changed in one merge.
2021-10-04 17:10:17 +00:00
Anders Broman eb9ae2ffd5 Read eNode-B raw logs 2021-10-04 16:08:27 +00:00
Evan Huus 5bc06b9042 proto_data: use pinfo->pool not the global scope 2021-10-04 15:52:10 +00:00
Evan Huus 9cf7ff44e1 wscbor-test: handle jmps
Satisfy GCC that all the variables in this test program will be
initialized / not-clobbered in various exceptional/longjmp cases.
2021-10-04 15:35:44 +00:00
Anders Broman 120aab63e3 NR-RRC:Make it possible to use dissctor handles for more cases. 2021-10-04 14:48:40 +00:00
Pascal Quantin c51073bc80 X2AP: upgrade dissector to v16.7.0 2021-10-04 14:30:28 +02:00
Pascal Quantin 1f7de4c724 S1AP: upgrade dissector to v16.7.0 2021-10-04 13:55:09 +02:00
Stig Bjørlykke 25ca031f53 Release notes: Add note about improved Reload Lua Plugins
Add a note about improved Reload Lua Plugins.
2021-10-04 09:40:42 +00:00
Stig Bjørlykke e724ab1b41 Qt: Handle fieldsChanged before prefs_apply_all
Improve reload Lua plugins to handle fieldsChanged before calling
the preferences apply callback, because a proto.prefs_changed()
function may call reload_packets() or redissect_packets(), and this
requires the fields to be updated.
2021-10-04 10:08:30 +02:00
Stig Bjørlykke e866034c55 Qt: Handle errors when reloading Lua FileHandler
Reloading the capture file after reloading a Lua FileHandler
may fail because of Lua errors. Handle this by closing the file.

Related to #17615
2021-10-04 07:15:11 +00:00
John Thacker 5c185238a4 BT-DHT: Test packets even if the dissector is set
BitTorrent clients use the same UDP conversation for both DHT and
uTP, switching back and forth between the two at connection start.
So even if the dissector has been set for the conversation or
ports to BT-DHT, test the packet and reject it if not DHT in order
to give the uTP dissector a chance. Fix #17626
2021-10-04 06:58:46 +00:00
John Thacker e05f704606 wiretap: camins, vwr: Stop heuristics after 1GiB
Very large 64 bit files are supported, so the CAM Inspector and
Ixia Veriwave heuristics, which are fairly weak and either always
(CAM Inspector) or possibly (Veriwave) try to read the entire file
should stop their heuristics and make a decision after some reasonable
length.

Without this, the GUI freezes for seconds, minutes, or even hours
by merely clicking on a large file in the file chooser, as
wtap_open_offline attempts to determine the file type. The same issue
occurs in capinfos, captype, tshark, editcap, etc.

In addition, previously the CAM Inspector heuristics could give the wrong
result on very large files, because 10 * invalid_pairs could overflow
its guint32 and then end up comparing as less than valid_pairs.

Fix #17620
2021-10-03 20:01:37 +00:00
Alexis La Goutte 7ca5d99d1e core: Fix -Wdocumentation
packet-cose.c:422:5: warning: '@return' command used in a comment that is attached to a function returning void [-Wdocumentation]
2021-10-03 19:22:06 +00:00
Alexis La Goutte f0da2cf58f core: Fix Wmissing-prototypes
packet-cose.c:1221:6: warning: no previous prototype for function 'proto_reg_handoff_cose' [-Wmissing-prototypes]
packet-cose.c:1185:6: warning: no previous prototype for function 'proto_register_cose' [-Wmissing-prototypes]
2021-10-03 19:22:06 +00:00
Alexis La Goutte 3cce9e3a74 core: Fix Clang Analyzer Warning
Value stored to 'sublen' is never read
2021-10-03 19:22:06 +00:00
Gerald Combs 4bda9dfd3d [Automatic update for 2021-10-03]
Update manuf, services enterprise numbers, translations, and other items.
2021-10-03 10:51:10 +00:00
Adrian Granados da11ef5770 ieee80211: Add 6E support when converting freq. to channel number.
Converting from freq to channel only needed the 6 GHz freq. range
to be added, however, converting from channel to freq. will require
the function ieee80211_chan_to_mhz to take a starting frequency as
there's overlap in the channel numbering between 2.4/5 GHz and 6 GHz
bands. This may not be possible in some cases, so for now the
function will continue to do the conversion based on the order
on which the freq. ranges are defined. Specifically, it will favor
2.4/5 GHz over 6 GHz.
2021-10-03 10:03:45 +00:00
Stig Bjørlykke 41f4855443 Lua: Make FileHandler seek_read() optional
When FileHandler seek_read() is not implemented use a default
implementation which does the same as the provided example to
file_seek() and then call the FileHandler read().
2021-10-03 11:04:29 +02:00
Stig Bjørlykke c6b046abd7 rdp: Fix compile errors
Remove double typedef zgfx_context_t.
Change from size_t to guint32 for a `residue` variable.
2021-10-03 10:31:07 +02:00