Commit Graph

80256 Commits

Author SHA1 Message Date
Eugene Adell 439ecf98b6 TCP: Obvious Spurious Retransmissions are not always detected
In rare circumstances Spurious Retransmissions are not detected
and the SEQ analysis would instead conclude with a Fast Retransmit
or an Out-Of-Order. As Spurious Retransmissions are more certain
than the latter ones, their respective precedences are changed.
The documentation is updated accordingly. Closes #13863.
2021-03-21 16:56:43 +00:00
Pascal Quantin 51cf733fc6 NGAP: have a single filter for RAN-UE-NGAP-ID or AMF-UE-NGAP-ID fields
Closes #17304

While in the area, replace - by _ in the other renamed filters as this
is what asn2wrs.py does.
2021-03-21 16:39:49 +00:00
Pascal Quantin 048a28e3bc IEEE80211: use G_GUINT64_CONSTANT instead of %ULL
As suggested in doc/README.developer
2021-03-21 17:19:05 +01:00
Pascal Quantin f81572ac09 IEEE80211: remove a shadowed variable 2021-03-21 17:08:43 +01:00
Pascal Quantin 66f35c7130 IEEE80211: squelsh a MSVC warning 2021-03-21 17:05:56 +01:00
Preston Hunt 1abe8cc3ce IEEE 802.11: add FTM ranging NTB-specific
Adds dissection of the non-trigger-based-specific subelement of the FTM
ranging parameters element.
2021-03-21 14:20:39 +00:00
Uli Heilmeier 07fb47111e DNS: IXFR/AXFR queries with multiple responses
IXFR and AXFR queries can have multiple DNS responses. As all responses
belong to one transaction, they have the same transaction ID.

We shouldn't handle them as retransmits.

Fix: wireshark/wireshark#17293
2021-03-21 14:02:27 +00:00
Nardi Ivan 90d9eb2062 TLS: another fix for Google-QUIC-Version Transport Parameters
The TP sent (encrypted) by the server is different from the one sent by
the client.
See: https://quiche.googlesource.com/quiche/+/refs/heads/master/quic/core/crypto/transport_parameters.cc

Fix: 8bcf6783a5
2021-03-21 13:29:29 +00:00
Guy Harris b61fd6d76a dfilter, ftypes: get rid of FT_PCRE.
It's not a valid field type, it's only a hack to support regular
expression matching in packet-matching expressions.

Instead, in the packet-matching code, have a separate syntax tree type
for Perl-compatible regular expressions, and a separate instruction to
load one into a register, and have the "matching" operator for field
types take a GRegex * as the second argument.
2021-03-21 03:27:44 -07:00
Guy Harris ce611792c3 dfilter: clean up indentation. 2021-03-21 02:15:00 -07:00
John Thacker de374722e8 TCP, HTTP: Fix reassembly of odd corner case of HTTP responses
RFC 7230 Section 3.3.3 case 7 allows a (discouraged) behavior
for HTTP responses of desegmenting until connection FIN when the
Content-Length is not given.
(See commit 69e50be150 for details.)

There is an even rarer subcase not currently handled- if the headers
are split aross multiple segments, then we won't know we need to
desegment until FIN until after than the first segment.

In such a case, msp->nxtpdu still needs to get set to some appropriately
large offset, since it didn't happen when processing the first segment.
2021-03-21 08:13:38 +00:00
Chuck Craft 936870d507 WSUG: remove extra "/" after adoc URL attributes
Wikipedia link didn't work
Fix wireshark wiki links for consistency
2021-03-20 17:34:58 -05:00
Thomas Dreibholz a9a476f855
SCTP dissector improvements
* Added a hint when SCTP association indexing is disabled (Closes: #17268)
* Added missing space in labels
2021-03-20 19:54:55 +01:00
Darius Davis 4c513fb4ab Minor doc cleanups.
Here's a grab bag of trivial cleanup to the documentation.  This change:

- Cleans up some comments in the asciidoctor macros which are no longer
  accurate (and do not appear in the build products anyway).

- Fixes a missing space in the text "Wireshark Q&A" in the release notes.

- Allows the "docbook" backend to produce hyperlinks too... That seems to be
  necessary if we want to start using our custom link macros in WSDG, which
  seems like a reasonable thing to do.  And fixes up a wrong variable name in
  the handling of the case where we are not able to produce a hyperlink.
2021-03-20 17:14:07 +00:00
João Valverde 9b3afa0278 Rewrite wmem_strbuf_append_vprintf() using vsnprintf() 2021-03-20 14:23:19 +00:00
João Valverde 392299d9ff wmem_test: Replace some assertions with equivalents 2021-03-20 14:23:19 +00:00
Roman-Koshelev b18bb58a95 json: add application/x-ndjson to the media types handled. 2021-03-20 13:54:20 +03:00
Guy Harris be000686de prefs: use g_error() to report certan errors.
Other errors use g_error(); use it for these errors, so the message is
more meaningful.
2021-03-20 01:33:44 -07:00
Guy Harris 9f04392c0f frame, tcp: don't g_assert while in the middle of dissecting.
Use DISSECTOR_ASSERT calls instead, so that *shark doesn't crash, it
just puts a complaint into the protocol tree.
2021-03-20 00:50:07 -07:00
Guy Harris 6ffbbcefa3 libwireshark: don't allow fields of type FT_PCRE to be registered.
It's a fake "field" type, used only for "field" values in
packet-matching expressions to do regular-expression matching.  There is
*no* reason to allow fields of that type.

Don't bother checking the representation type when generating the string
representation of a field value.  If a developer manages to get past all
the tests for FT_PCRE to register and add an instance of that field to
the protocol tree, either 1) the one and only string representation of
an FT_PCRE value is what they want, in which case, whatever, or 2) it's
*not* what they want, in which case, if they file a bug, ask a question
on a mailing list, or ask a question on the Q&A site, we can explain to
them that what they're doing is bogus.
2021-03-20 00:02:51 -07:00
John Thacker 54c30c8336 TCP: Handle sequence number wraparound in multisegment pdus
msp->nxtpdu might wrap around (particularly if DESEGMENT_UNTIL_FIN
is set), so use the wrap around aware sequence number comparisons
when seeing if seq is in the interval [msp->seq, msp->nextpdu).
Note that with wraparound, we have to take the minimum after subtracting
to get the length desired.
2021-03-19 08:25:23 +00:00
Grzegorz Niemirowski d025bdca05 Dissection of Abort packet and characters number in Authorization 2021-03-18 23:58:07 +01:00
Vojtěch Svědiroh 90da092772 MNDP: Add TLV 17 (IPv4 Address) 2021-03-18 10:48:47 +00:00
Guy Harris 5a4cb7ce33 caputils: pull the includes out of extern "C" { ... }.
Have separate #ifdef HAVE_LIBPCAP ... #endif sections for the includes
and the definitions/declarations.

(There are no good solutions that don't require hopping in a time
machine and changing history.)
2021-03-17 21:22:41 -07:00
Guy Harris 4584b9d1d3 caputils: get rid of the extern "C" { idiom.
Instead, declare each function with EXTERN_C, #defined as extern "C" in
C++ and just extern in C.

This avoids all the thrashing to try to keep headers outside extern "C"
{ by the simple expedient of not *having* extern "C" {.
2021-03-17 14:59:55 -07:00
Dario Lombardo 9ca121bcf8 caputils: fix compilation without pcap.
The extern declaration must be put outside the ifdef to match the
closing statement as well as surrounding al the functions.

Fixes: 2820156fbd (Move still *more* headers outside of extern "C".)
2021-03-17 21:21:21 +00:00
Pascal Quantin f6e0de60db Windows: upgrade Npcap to 1.20 2021-03-17 20:46:52 +00:00
Nardi Ivan 6cdfc087c5 TLS: add support for brotli-compressed certificates 2021-03-17 20:10:08 +00:00
David Perry 02a4d41c10 Fix typo in packet-exported_pdu.c
The hidden entry for `ipv6.addr` was mistakenly being generated as
`ipv6.src` instead.
2021-03-17 14:48:37 +00:00
Anders Broman f5fb60cfdd GTP: Fix the version check in decode_qos_umts() 2021-03-17 10:34:30 +00:00
Preston Hunt eda6acb63b 802.11: add dissection of FTM Ranging Parameters 2021-03-17 10:18:26 +00:00
ranjetsih 83165d0107 PFCP: Add missing dissection of ipv6 pd address in UE IP Address
Dissection of UE IP Address was incomplete with missing ipv6 pd address field. This is added by this change.
refer https://gitlab.com/wireshark/wireshark/-/issues/17300 for more details of the issue.
2021-03-17 13:49:22 +05:30
Alexis La Goutte eee8476acd tls(-utils): Add value from RFC 8998 2021-03-17 07:23:36 +00:00
Guy Harris 7efb2120bc kerberos: regenerate packet-kerberos.h.
We updated the template; regenerate the header.
2021-03-16 14:57:30 -07:00
Guy Harris 2820156fbd Move still *more* headers outside of extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 13:50:13 -07:00
Pascal Quantin 205e77d404 ISAKMP: Pad Length field is 1 byte long 2021-03-16 15:28:30 +00:00
Mikael Kanstrup d3235c685b ieee80211: Support decrypting Fast BSS Transition with roaming
Support decrypting captures with Fast BSS Transition roaming present
by now also scanning (re)association frames for relevant information
elements and feeding it into the dot11decrypt engine.

Both (re)association request and response frames are scanned to allow
for potentially missing one frame and still be able to derive PTKs
needed for successful decryption.

Closes #17145

Change-Id: I08436582e4f83695dc606ddb92ff442d6258ef9b
2021-03-16 14:36:26 +00:00
Mikael Kanstrup da05e55c74 ieee80211: Display IGTK and GTK subelem key lengths in decimal form 2021-03-16 14:36:26 +00:00
Mikael Kanstrup 49f279a04d ieee80211: Convert proto data type define to an enum
Convert the proto data type defines to an enum to avoid explicitly
have to give each type a value.
2021-03-16 14:36:26 +00:00
Mikael Kanstrup f0dcee3787 ieee80211: Save dot11decrypt proto data only when decryption is enabled 2021-03-16 14:36:26 +00:00
ishaangandhi 37b3295175 ICMP6: Parse RFC 5837 extension structures 2021-03-16 14:16:43 +00:00
Guy Harris e434d404d0 Move even more headers outside extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 04:33:00 -07:00
Guy Harris 1e1f4e6b5f Move more headers outside extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 02:36:10 -07:00
Guy Harris a892a161d7 pcapng: add some comments warning not to cheat.
Add comments in various switch statements warning people *not* to add
standardized block types or option codes that aren't in the pcapng spec.
If you want a standardized block or option type, go through the
standards process.
2021-03-16 00:52:42 -07:00
Guy Harris a7d98a2cc9 Expand a comment.
Give details on what happens when running Wireshark from a GUI on
UN*Xes, or, at least, on {macOS,Ubuntu+GNOME,Ubuntu+KDE}, although
it's probably similar on other UN*Xes and on other desktop environments.
2021-03-15 18:40:19 -07:00
Guy Harris 8f965899b3 Remove unnecessary includes of wiretap/pcap-encap.h. 2021-03-15 16:04:02 -07:00
Guy Harris ce20c00049 Remove unnecessary inclues of wiretap/pcapng.h. 2021-03-15 15:29:40 -07:00
Guy Harris 9bf838b2ea tap_export_pdu: finish the job of reporting errors.
Provide the pathname of the file, and the frame number, to the error
routines.
2021-03-15 14:52:12 -07:00
Guy Harris 8795edd57c tap_export_pdu: report write errors on the output file.
Now that we have report_cfile_write_failure(), use it.

Also, if an error occurs, eturn TAP_PACKET_FAILED, so we don't keep
trying to write.
2021-03-15 14:03:24 -07:00
Guy Harris 37000e9565 tap_export_pdu: clean up includes.
Get rid of some unnecessary includes, put all the wsutil/ includes
together, use angle brackets for all of them, move version_info.h down.
2021-03-15 13:01:03 -07:00