Commit Graph

78792 Commits

Author SHA1 Message Date
Guy Harris e02229250d Nettrace: Fix fix to calculation of changetime
A long time ago, in a galaxy far far away, C had arithmetic/logical-
plus-assignment operators, so that

	a = a {op} x;

could be written as

	a ={op} x;

Unfortunately, if {op} is -, that meant that you could have, for
example:

	a =- 17;

which could be interpreted as

	a = -17;

so they changed the operators to be

	a {op}= x;

I.e., if you want to subtract 1000 from a variable, do

	elapsed_ms -= 1000;

not

	elapsed_ms =- 1000;
2020-10-03 07:21:40 -07:00
Anders Broman 79bf1f7d99 Nettrace: Fix calculation of changetime
Closes #16869 (closed)
2020-10-03 07:23:55 +00:00
Gerald Combs 3ff9406529 FBZERO: Make sure our offset advances.
Make sure our offset advances so that we don't infinitely loop.
Fixes #16887.
2020-10-03 06:52:10 +00:00
Guy Harris e013c5ec7f Clean up URLs.
Add ui/urls.h to define some URLs on various of our websites.  Use the
GitLab URL for the wiki.  Add a macro to generate wiki URLs.

Update wiki URLs in comments etc.

Use the #defined URL for the docs page in
WelcomePage::on_helpLabel_clicked; that removes the last user of
topic_online_url(), so get rid of it and swallow it up into
topic_action_url().
2020-10-02 20:13:42 -07:00
Gerald Combs 22e7ddb637 LBMSRS: Break out of a loop.
Break out of a loop if our offset advances. Fixes #16886.
2020-10-02 21:26:12 +00:00
Chuck Craft 4a0d8d4ef6 Qt: point to Lua wiki page now on Gitlab 2020-10-02 17:25:54 +00:00
Peter Wu 43e0bd125b QUIC: fix dissection of Short Header packets with Grease QUIC bit
The condition aimed to avoid interpreting padding bytes after the
Initial Packet as Short Header to avoid breaking decryption. However it
also prevents actual Short Header packets from being matched that have
the QUIC bit cleared.

To avoid breaking the latter, strengthen the condition to match the
former only. Tested with quic-31_grease_quic_bit__with_keys.pcapng (from
!429). Regression tested against a private Firefox Nightly trace.
2020-10-02 10:06:50 +00:00
Dr. Lars Völker b57832fdbf TECMP: Adding CAS flag for FlexRay
This adds the CAS (Collision Avoidance Symbol) to the TECMP dissector.

Signed-off-by: Dr. Lars Völker <lars.voelker@technica-engineering.de>
2020-10-02 04:58:56 +00:00
Gerald Combs 4a82dd165b Version: 3.3.1 → 3.3.2. 2020-10-01 12:18:35 -07:00
Gerald Combs d64aca7966 Build: 3.3.1. 2020-10-01 10:32:43 -07:00
Alexis La Goutte 82e7835b2e EAP: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-10-01 07:14:40 +00:00
Gerald Combs d2da4c7afb Qt: Use … instead of UTF8_HORIZONTAL_ELLIPSIS in translated strings.
Run

$ gsed -i -e 's/\(tr *(.*".*\)" *UTF8_HORIZONTAL_ELLIPSIS/\1…"/' $( ag -l 'tr *\(.*" *UTF8_HORIZONTAL_ELLIPSIS' )
$ gsed -i -e 's/\(tr *( *\)UTF8_HORIZONTAL_ELLIPSIS *"/\1"…/' $( ag -l 'tr *\( *UTF8_HORIZONTAL_ELLIPSIS *"' )

in ui/qt. As discussed in #16812, the UTF8_ macros were required at one
time because we only allowed ASCII in our source code. However, that
requirement has since been relaxed and Qt's translation framework
doesn't handle concatenating strings and macros very well.
2020-10-01 06:40:14 +00:00
Ronnie Sahlberg 9ad3d14ea4 http: don't try to dissect zero-length bodies
Closes #16844

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-10-01 07:49:33 +10:00
Dario Lombardo df7d1905eb github: fix macOS build.
Use xcode from command line tools.
See:
  https://www.wireshark.org/lists/wireshark-dev/202004/msg00065.html
2020-09-30 17:59:20 +00:00
Gerald Combs 4105e65add Tools: Handle leading "#"s in gen-bugnote.
GitLab's version of Markdown denotes issue IDs with a leading "#".
2020-09-30 09:56:53 -07:00
Gerald Combs bf46e5c4cc Docs: Note that you can group filter buttons.
Note that you can group filter buttons in the release notes and in the
filter toolbar docs.
2020-09-30 16:27:38 +00:00
Anders Broman a08e78f324 GTPv1: Highlight only the value part of "TEID Control Plane"
While at it use proto_tree_add_item_ret_uint().
Closes #16881
2020-09-30 12:22:04 +02:00
Alexis La Goutte b65893f4f4 lithionics: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Alexis La Goutte 71ea1f9017 dcerpc: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Alexis La Goutte 4ad8adeab4 gtp: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Alexis La Goutte e126d91455 mbim: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Alexis La Goutte de44c3e392 smb2: Fix Dead Store
Fix dead store (Dead assignement/Dead increment) Warning found by Clang
2020-09-29 18:53:21 +00:00
Anders Broman 7d3ee49180 RTCP: Add dissection of Application mccp TS 24.380 2020-09-29 16:47:42 +00:00
Aurelien Aptel 7514e50d16 SMB2: add reasonable upper limit to pattern_v1 repetition
MAX_UNCOMPRESSED_SIZE is currently 16MiB.

Fix Coverity report CID 1467509: Insecure data
handling (TAINTED_SCALAR) Using tainted variable "times" as a loop
boundary.
2020-09-29 11:00:18 +02:00
Guy Harris 3502d53ffb Remove leftover cruft from previous comment. 2020-09-29 04:39:51 +00:00
Gerald Combs c34bc0cf4c Qt: Handle palette changes in the packet diagram.
Handle ApplicationPaletteChange (e.g. dark / light mode switching)
events in the packet diagram. Add resetScene() and call it where needed.
2020-09-28 23:56:08 +00:00
Martin Mathieson 2ecd9f6818 IEEE 802.11: Use common filter string for action_code
For radio measurements, use same filter string as most others,
i.e. wlan.fixed.action_code.
2020-09-28 23:29:01 +00:00
Ronnie Sahlberg b9a2d861e4 quic: fix reassembly issue for smb2 (and other protocols)
If we did not find an msp that matched the current segment we would
try to find the msp for set-1 instead. This will only work IFF
we do not know the the exact size of the PDU and where it ends,
i.e. DESEGMENT_ONE_MORE_SEGMENT and friends.

In the case where "get msp for seq-1" gives us an msp where we know the exact
PDU boundary and the current seq is beyond the end of that boundary, then
we should not use the msp for seq-1 but instead treat this as a brand new PDU.

This fixes issues with SMB2-over-QUIC dissection that can be seen in the
sample capture for the "add smb2-over-quic" bug where only the first
multi-segment PDU would be dissected correctly for each direction.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2020-09-28 23:07:37 +00:00
Guy Harris c597927da8 Add some more string encodings.
Add an encoding for "unpacked" 3GPP TS 23.038 7-bit strings, in which
each code position is in a byte of its own, rather than with the code
positions packed into 7 bits.  Rename the packed encoding to explicitly
indicate that it's packed.

Add an encoding for ETSI TS 102 221 Annex A strings.

Use the new encodings.
2020-09-28 22:30:35 +00:00
Gerald Combs b7c0dc3cb1 Qt: Make sure the packet diagram always has a field value.
Have FieldInformation::toString return "[no value for field]" instead of
an empty string so that the packet diagram always has something to
display.
2020-09-28 12:14:14 -07:00
Martin Mathieson 8b4e0148a2 Fix some more wrong filter names.
These are duplicates detected seen by running
check_typed_item_calls.py  --consecutive.

There are still quite a few more to go.
2020-09-28 18:20:09 +01:00
Tom Yan c69d8dd410 extract_asn1_from_spec.pl: add version into exported asn file 2020-09-28 14:53:26 +00:00
Nardi Ivan ec7c5699a7 QUIC: update to draft-31 2020-09-28 14:31:08 +00:00
Ben Bass 73c0e8efc9 Add Metaswitch vendor-specific AVPs for Diameter 2020-09-28 14:30:22 +00:00
Martin Mathieson 6dd9c098ad check_typed_item_calls.py: add --consecutive flag
Add a check to point out where consecutive items have the same filter
but different labels.  Quite a few of these look like bugs.

Also, make some REs raw strings, as identified as an issue in
https://gitlab.com/wireshark/wireshark/-/merge_requests/346
2020-09-28 08:01:21 +00:00
Gerald Combs 24ef8400fe Release notes: Add an item about Npcap 1.00. 2020-09-28 05:13:22 +00:00
Jeff Widman 330fd5733c Add /*build*/ to .gitignore
A common pattern is to build the source artifacts within a *build* dir.

For example, the wiki instructions for [building `wireshark` on `macOS` specify to
create a `./build`
directory](https://gitlab.com/wireshark/wireshark/-/wikis/BuildingAndInstalling#macos):
```
mkdir build && cd build && cmake ../ && make
```

So this commit adds this directory to `.gitignore` to prevent
accidentally committing build artifacts.

The specific format `/*build*/` protects against the following:
1. The leading slash makes sure only top-level directories that match
this pattern are ignored.
2. The trailing slash makes sure that only directories (and not files)
are ignored.
3. The wildcards catch all the various variations on `build` folder name
that are used...
2020-09-27 21:36:15 +00:00
Martin Mathieson 08ab0e5d1f Fix some wrong filter names.
These were detected by running check_typed_item_calls.py
with --consecutive, which flags items that have different
labels but the same filter string.  Usually this is because
of copy/paste.

Quite a few similar bugs still exist, will address in a future commit.
2020-09-27 18:40:13 +00:00
Gerald Combs 2dd014f8f2 [Automatic update for 2020-09-27]
Update manuf, services enterprise numbers, translations, and other items.
2020-09-27 16:25:52 +00:00
Pascal Quantin 0b99248593 Windows: upgrade Npcap to 1.00 2020-09-27 14:22:19 +02:00
Gerald Combs d1f29ee338 Qt: Fix the packet diagram start offset arithmetic.
572c1ae5a3 introduced a bug that allowed for negative diagram item start
values. Fixup our arithmetic so that that doesn't happen.
2020-09-26 12:23:54 -07:00
Gerald Combs 8b9ec1b5a5 Qt: Reset the packet diagram between captures.
QGraphicsScene::clear() doesn't reset the scene's the size and scroll
position. This is useful when we switch between packets, but we should
do a hard reset when switching between captures.
2020-09-26 11:34:21 -07:00
Jeff Widman 8d7ebc732e Fix issues discovered by common python linters
Fix some issues discovered by common python linters including:
* switch `None` comparisons to use `is` rather than `==`. Identity !=
equality, and I've spent 40+ hours before tracking down a subtle bug
caused by exactly this issue. Note that this may introduce a problem if
one of the scripts is depending on this behavior, in which case the
comparison should be changed to `True`/`False` rather than `None`.
* Use `except Exception:` as bare `except:` statements have been
discouraged for years. Ideally for some of these we'd examine if there
were specific exceptions that should be caught, but for now I simply
caught all. Again, this could introduce very subtle behavioral changes
under Python 2, but IIUC, that was all fixed in Python 3, so safe to
move to `except Exception:`.
* Use more idiomatic `if not x in y`--> `if x not in y`
* Use more idiomatic 2 blank lines. I only did this at the beginning,
until I realized how overwhelming this was going to be to apply, then I
stopped.
* Add a TODO where an undefined function name is called, so will fail
whenever that code is run.
* Add more idiomatic spacing around `:`. This is also only partially
cleaned up, as I gave up when I saw how `asn2wrs.py` was clearly
infatuated with the construct.
* Various other small cleanups, removed some trailing whitespace and
improper indentation that wasn't a multiple of 4, etc.

There is still _much_ to do, but I haven't been heavily involved with
this project before, so thought this was a sufficient amount to put up
and see what the feedback is.

Linters that I have enabled which highlighted some of these issues
include:
* `pylint`
* `flake8`
* `pycodestyle`
2020-09-26 04:38:18 +00:00
Aurelien Aptel c5926c51e7 SMB2: add tests for chained compression and pattern_v1 2020-09-26 02:23:23 +00:00
Aurelien Aptel 3d94644dc8 SMB2: add new pattern_v1 decompression support
Simple decompression algorithm that encodes a single byte and the
number of times it is repeated.

This algorithm can only be used in chained compression packets.
2020-09-26 02:23:23 +00:00
Aurelien Aptel b0f5b2c174 SMB2: handle chained compression
The compression header "reserved" field is now a flags field.
If the flags have the CHAINED bit, the meaning of the offset field
changes and becomes a length field.

	  "old" compressed method:

	  [COMPRESS_TRANSFORM_HEADER with Flags=0]
	    [OPTIONAL UNCOMPRESSED DATA]
	    [COMPRESSED DATA]

	  new "chained" compressed method:

	  [fist 8 bytes of COMPRESS_TRANSFORM_HEADER with Flags=CHAINED]
	    [ sequence of
               [ COMPRESSION_PAYLOAD_HEADER ]
               [ COMPRESSED PAYLOAD ]
2020-09-26 02:23:23 +00:00
Aurelien Aptel b2fd5bcfb9 SMB2: stick the compress header items under the header tree
This makes it behave like the other headers.
2020-09-26 02:23:23 +00:00
Aurelien Aptel fed08cfd45 SMB2: label decompressed data as such and mark as generated 2020-09-26 02:23:23 +00:00
Martin Mathieson 906ead6993 Fix some more doc folder spelling errors. 2020-09-25 22:20:21 +01:00
Thomas Vogt acdaf33630 README.developer: Fix some quotation marks around function names 2020-09-25 15:29:14 +00:00