Change-Id: I9d1ae0bf1d6df0b9da0220aeff2dd73b5f18f38a
Reviewed-on: https://code.wireshark.org/review/7407
Reviewed-by: Michael Mann <mmann78@netscape.net>
Fixes an ASAN failure reported by Alexis
Change-Id: I33b21d148e631e8a554882283a1c7284d701af1a
Reviewed-on: https://code.wireshark.org/review/7409
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
I happened across the discussion in Ia44e0791b6ee78ad594de342c4f2401bad9beb4e
which indicates that protocols running over SSL can use tcp_dissect_pdus() too.
So do it in the SSTP dissector.
Change-Id: I3de14c1b2af5e4e5fe3630121366b71a5ad223cf
Reviewed-on: https://code.wireshark.org/review/7333
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
* Fix incorrect offset for Block Selector field
in Get LAN Configuration Parameter request.
* Expect 0x83 completion code ("Attempt to read write-only parameter")
for Get LAN Configuration Parameter command instead of
Set LAN Configuration Parameter command.
Change-Id: I5be37c5f96db91b70329bfce906ce76f7b8b6958
Reviewed-on: https://code.wireshark.org/review/7403
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
AC_CHECK_FUNC() doesn't define HAVE_XXX but AC_CHECK_FUNCS() does. And
AC_CHECK_LIBS() certainly doesn't define HAVE_<function>.
Also remove some ancient comments.
Change-Id: I49d701bb96d3bd3c55c4beb99d532e397ec554ad
Reviewed-on: https://code.wireshark.org/review/7400
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
One spot was missing the check.
Change-Id: I72d1d3d2dec2cc71b02861ace59dc9e189721cfb
Reviewed-on: https://code.wireshark.org/review/7401
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Provide {FULL,PART}SIZEDEFV10 macros, similar to what's provided for the
other versions, containing the code to set the packet length and
captured data length, and use the TRACE_V10_REC_LEN_OFF() macro directly
after that to set the various length and offset values in the
pseudo-header.
Change-Id: I3513371057601b44821d89ebaa7565ab370a67f5
Reviewed-on: https://code.wireshark.org/review/7393
Reviewed-by: Guy Harris <guy@alum.mit.edu>
No need to export them outside this file, and making them constants
might convince the compiler not to bother fetching their values from
memory when referring to them.
Change-Id: Ib8605bf0bb9091721a51827c45fe75d19a15ba26
Reviewed-on: https://code.wireshark.org/review/7378
Reviewed-by: Guy Harris <guy@alum.mit.edu>
That way it'll set the captured length and reported length the same way
it's done in the read routine.
Change-Id: I8b1f2d0d8fa688f44b6f61f16dc2e21b5648fc12
Reviewed-on: https://code.wireshark.org/review/7376
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Rename the V10 PACKET_DESCRIBE()'s "fpp" argument to "type", and have it
declare the pointer variable.
Change-Id: I3ac52ebdef0aec7bc95052277537185132886b57
Reviewed-on: https://code.wireshark.org/review/7374
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Move it in the argument list, and use it instead of a hard-coded 10
(even though it's always passed as 10), to match the other
PACKET_DESCRIBE() macros.
Change-Id: Idd0a23a58cc6bb0d2de799b039db776d279cc03e
Reviewed-on: https://code.wireshark.org/review/7372
Reviewed-by: Guy Harris <guy@alum.mit.edu>
The name "type" is thrown around to mean both a version number and a
part of a structure member, and some other macros use "ver" for the
version number; try to make things a little less inconsistent.
Change-Id: I61405cf41cca43fe607154af7498944c5ec0ef11
Reviewed-on: https://code.wireshark.org/review/7370
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Makes the various flavors of that macro more similar.
Change-Id: Ie95ee8db0b226458146b055b54b7d61835f1e508
Reviewed-on: https://code.wireshark.org/review/7368
Reviewed-by: Guy Harris <guy@alum.mit.edu>
A bit of regularization.
Change-Id: I60e0bd50891e1ba3e9c40f8d1d14d63534e08138
Reviewed-on: https://code.wireshark.org/review/7364
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Use that rather than TYPE or acttype (to indicate that it's a header
version number to use as the "xxx" in NSPR_HEADER_VERSIONxxx, and to use
the same name throughout).
Change-Id: I14cfc819e44ce4388c27d521a1256dec8d80df2e
Reviewed-on: https://code.wireshark.org/review/7361
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Just like the read routine.
Change-Id: If6bd98bea15f1c8dc7454a5dac0ea57920bddc8c
Reviewed-on: https://code.wireshark.org/review/7355
Reviewed-by: Guy Harris <guy@alum.mit.edu>
That makes it even more like V2x and V3x and slightly less unclear.
Change-Id: I798ead123ba6418be0252067773a951390e26ce8
Reviewed-on: https://code.wireshark.org/review/7353
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Have it set the record type and initialize the presence bits.
That makes it a bit more like V2x and V3x, and makes the code slightly
less unclear.
Change-Id: Ibfbe2143b24a68c3fa3f576616fde81918b01feb
Reviewed-on: https://code.wireshark.org/review/7351
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This makes the code slightly less unclear. (You are in a maze of twisty
little C macros, all different.)
Change-Id: I9f1bcc7a9a1a7afe87ede8b1ba513e3d8e53845c
Reviewed-on: https://code.wireshark.org/review/7349
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This reverts commit f9fc25241c.
Apparently, clang is wrong about those increments being dead, as the tests done by exntest fail as a result of this change. Perhaps it doesn't understand setjmp/longjmp.
Change-Id: I248fba972e52bcbc97a228777139ca22a835f4b6
Reviewed-on: https://code.wireshark.org/review/7347
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Convert "&" to "&&" in checkbox and radio button preference labels so
that they aren't interpreted as shortucts. Fixes
QKeySequence::mnemonic: "Attempt to dissect LCID 1&2 as srb1&2" contains multiple occurrences of '&'
Change-Id: Iacab6f81db01e6eca2cfdbaeda666f2e9c1016ed
Reviewed-on: https://code.wireshark.org/review/7346
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Removing the macros for packet sender/receiver as it makes
the code hard to read and maintain. the more generic routine
opensafety_packet_node is also used for displaying the time
request sender and recipient.
Also clearing up the message id field, as it is the wrong size
and making the detection for the value an hf_field with an
array value.
Change-Id: I31cf0f944fe803fb503f4c5d29e106dfae0f6938
Reviewed-on: https://code.wireshark.org/review/7344
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Add PacketList::applyRecentColumnWidths which set the packet list
column widths from our recent settings. Make sure it gets called at
startup and when we change profiles.
Save the packet list header state so that we can restore it when we
reset the model (i.e. freezing and thawing) and load a new capture file.
Save the state when the user resizes a column. As a side effect this
works around a weird bug that adjusts the width of column 1 at an
inopportune time.
Add a profileChanging signal so that we can save the main window geometry
in each profile.
Get rid of MainWindow::configurationProfileChanged. It was unused.
Apply saved pane widths and heights. Note that we might want to add a
separate pair of recent settings for the Qt panes.
Use the last opened directory in the capture file dialog.
Git rid of some unneeded Q_UNUSEDs while we're here.
Bug: 10953
Change-Id: I812aff59818cf0b4d1598b580627d32728d2e9d7
Reviewed-on: https://code.wireshark.org/review/7247
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Change-Id: I91ec67e8c2168dd9a93c3894abdf304c0a75845d
Reviewed-on: https://code.wireshark.org/review/7263
Reviewed-by: Michael Mann <mmann78@netscape.net>
gcc5 bails out with the below error.
CC libwireshark_la-tvbparse.lo
CC libwireshark_la-tvbuff_base64.lo
tvbparse.c: In function 'cond_not_char':
tvbparse.c:254:18: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
if (! offset < tt->end_offset ) {
^
cc1: all warnings being treated as errors
Makefile:1843: recipe for target 'libwireshark_la-tvbparse.lo' failed
Change-Id: I4e8654e97079da6b39be580fc766eecefb4c7ea6
Reviewed-on: https://code.wireshark.org/review/7339
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Use tcp_dissect_pdus to handle reassembly and avoid a recursion in
dissect_websocket. The HTTP dissector is modified to preserve
desegmentation functionality (tested with the capture from bug 8448).
As tcp_dissect_pdus is used now, the workaround for bug 8448 can be
removed and the actual frame dissection logic becomes simpler (the
length is checked in get_websocket_frame_length).
Bug: 10989
Change-Id: I67af96a6c7be88c2a77e1c4138abe90bdb880774
Reviewed-on: https://code.wireshark.org/review/7285
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>
When DNS Client Subnet length is > 16, the limit coming from avoid stack smashing with tvb_memcpy
Issue reported by Boaz
Bug:10988
Change-Id: I6103ba47fac9817410c7fc399c18e96c66ab8438
Reviewed-on: https://code.wireshark.org/review/7308
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Freeze and thaw the packet list when changing the layout. This has the
side effect of clearing the proto tree and byte view, which avoids
reading a bad tvb pointer. Note that we might want to add a cleanup
callback to free_data_sources.
Save and restore the current row. Add CaptureFile::currentRow. Fix a
couple of comparisons in PacketList.
Change-Id: I26f9b97ae5a7cdb4fb6e5e6e675570884900e995
Reviewed-on: https://code.wireshark.org/review/7337
Reviewed-by: Gerald Combs <gerald@wireshark.org>
gcc5 complains about the issue below, so add a trivial fixup.
CC libwiretap_la-pcap-common.lo
pcap-common.c: In function 'pcap_byteswap_nflog_pseudoheader':
pcap-common.c:1290:30: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
if (!(nfhdr->nflog_version) == 0) {
^
cc1: all warnings being treated as errors
Change-Id: I9f5b090ffd564f203cc3fb4ff302f2e4752865f0
Reviewed-on: https://code.wireshark.org/review/7336
Reviewed-by: Guy Harris <guy@alum.mit.edu>
According to specification first mandatary parameter is Channel Type (BE_CHAN_TYPE)
but not Current Channel Type 1 (BE_CURR_CHAN_1).
And also "Channel Type" is TLV but not TV type.
Change-Id: I740dc10930a854fcb1cf2e09a19d57a16f8cf33e
Reviewed-on: https://code.wireshark.org/review/7330
Reviewed-by: Anders Broman <a.broman58@gmail.com>
We already add the opcode, a "this is a response" indication for
responses and, for non-WACK responses, the response code. No need to
add it again.
Change-Id: I2dd0f937568057a96cd70511c872f811ea838106
Reviewed-on: https://code.wireshark.org/review/7331
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Merge the three separate regexes into a single pattern and use named
groups. This avoid magic numbers (group positions) and removes a
possible error source when the ht array gets out of sync with the
patterns array (by human error).
This is supposed to be more readable and allows for easier extension of
the regex.
Change-Id: I816525f358cdb89ff9f8ebc1211139b1f8c23840
Reviewed-on: https://code.wireshark.org/review/7245
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
When the ipv6 flow label is non-zero the dissector does not detect the payload as being ipv6.
Issue reported by Shehan Perera
Bug:10976
Change-Id: I1de4966dfefd1afa9bb51b9a7570091aad59fbdd
Reviewed-on: https://code.wireshark.org/review/7260
Reviewed-by: Anders Broman <a.broman58@gmail.com>
XXX_to_str routines should return the length, in bytes, of the generated
string, including the terminating '\0'.
As their reutrn values include the terminating '\0', we need to subtract
1 from the return value if, when appending the ")" after the address
string, we want to skip past the address string rather than skipping
past the terminating '\0'.
Change-Id: Ibfd41e6d7152d05070706e6d76fc3e56a097a75b
Reviewed-on: https://code.wireshark.org/review/7324
Reviewed-by: Guy Harris <guy@alum.mit.edu>
The formatting routine is getting passed the 5-byte value, not some
8-byte value that includes the 3 bytes after it, so shifting it produces
the wrong value.
Make the longitude and latitude FT_UINT40, as they're only 5 bytes long.
Change-Id: I35aa05887bcfdfc1107fef2ac5069f1fe96fda3a
Reviewed-on: https://code.wireshark.org/review/7321
Reviewed-by: Guy Harris <guy@alum.mit.edu>