Commit graph

14939 commits

Author SHA1 Message Date
Arne Welzel
df4f90b65c ip4_hdr: Add DF, MF, offset and sum fields
For low-level packet analysis use-cases, these fields are currently
not script-land accessible via raw_packet() or so. They are accessible
on the icmp_context record, but not on the actual ip4_hdr record, so
add them.
2023-04-29 17:09:43 +02:00
Dominik Charousset
7af3611807 Move build defaults from configure to CMake
Moving the defaults for build variables from the `configure` script to
`CMakeLists.txt` gives the same default behavior on platforms where the
`configure` script is not available (Windows) and also allows a pure
CMake-based work flow (e.g., the standard `cmake -S . -B build`) without
having to manually adjust the defaults.

The `configure` script also becomes much simpler as a result.
2023-04-29 11:04:30 +02:00
zeek-bot
3a172bde38 Update doc submodule [nomail] [skip ci] 2023-04-29 00:24:30 +00:00
Tim Wojtulewicz
a7c9454224 Merge remote-tracking branch 'origin/topic/timw/2980-cirrus-updates'
* origin/topic/timw/2980-cirrus-updates:
  CI: Automatically update opensuse-tumbleweed
  CI: Remove Fedora 36, add Fedora 38
2023-04-28 16:33:56 -07:00
Tim Wojtulewicz
15a39c230c CI: Automatically update opensuse-tumbleweed 2023-04-28 16:33:11 -07:00
Tim Wojtulewicz
64bcf50837 CI: Remove Fedora 36, add Fedora 38 2023-04-28 16:33:11 -07:00
Arne Welzel
b677f5b37b unload: Fix unloading of packages
@ynadji found that unloading packages doesn't work due to @unload not
resolving the __load__.zeek file within a directory like @load does.

Fixes #2991
2023-04-28 11:47:55 +02:00
Arne Welzel
f227b30d30 Merge remote-tracking branch 'origin/topic/awelzel/2791-pcap-stat-overflow'
* origin/topic/awelzel/2791-pcap-stat-overflow:
  pcap/Source: Allow more than 32bit for link and dropped stats
2023-04-28 10:02:30 +02:00
Arne Welzel
3c646b5bf6 Merge remote-tracking branch 'origin/topic/awelzel/record-fields-optional'
* origin/topic/awelzel/record-fields-optional:
  record_fields: Include information about optionality of fields
2023-04-28 10:00:27 +02:00
Arne Welzel
440a7e7ccf Merge remote-tracking branch 'origin/topic/timw/compiler-warnings'
* origin/topic/timw/compiler-warnings:
  Fix a few warnings from recent changes
2023-04-28 10:00:00 +02:00
Arne Welzel
5541066660 pcap/Source: Allow more than 32bit for link and dropped stats
The PktSrc::Stats object works with 64bit unsigned integers. Unfortunately,
libpcap's struct pcap_stat is using 32bit values and users have reported
the wrapping of these values being visible in their stats.log roughly every
7.5 hours (~160kpps).

This change moves tracking of link and drop counters into the PktSrc::Stats
object (like is done for received and bytes_received) and updates them
on a call to PcapSource::Statistics() with the difference to the
previous stats values to prevent the wrap from becoming visible to
script land.

This doesn't cover the case of the stats counters wrapping around multiple
times between two invocations of PktSrc::Statistics(). With the default
interval of 5 minutes for the stats script, this seems acceptable.

Closes #2791.
2023-04-28 09:59:26 +02:00
Arne Welzel
667cdd5c27 Merge remote-tracking branch 'jgras/topic/jgras/cluster-init-tests'
* jgras/topic/jgras/cluster-init-tests:
  Simplify btests using cluster_started event.
  Remove old cluster start tests.

Reverted removal of old cluster start tests during merge.
2023-04-28 09:37:25 +02:00
zeek-bot
605e749133 Update doc submodule [nomail] [skip ci] 2023-04-28 00:28:42 +00:00
Tim Wojtulewicz
eb9d851a07 Fix a few warnings from recent changes 2023-04-27 15:38:02 -07:00
Arne Welzel
f4bb8fae33 record_fields: Include information about optionality of fields
This was reported as a wish for log schema generation, so add it...
2023-04-27 21:18:35 +02:00
Tim Wojtulewicz
f3f139deab Merge remote-tracking branch 'origin/topic/timw/windows-ci-unit-testing'
* origin/topic/timw/windows-ci-unit-testing:
  Modify Windows test cmd file to actually run tests
  Add template file and cmake call for zeek-path setup on Windows
2023-04-27 11:26:00 -07:00
Arne Welzel
0374d0fe42 Update zeek-aux submodule [nomail] 2023-04-27 15:17:11 +02:00
Arne Welzel
a3ef8783b1 Merge remote-tracking branch 'origin/topic/neverlord/gh-2806'
* origin/topic/neverlord/gh-2806:
  test/builtin-plugins: Add plugin using ZEEK_VERSION_NUMBER
  Revert putting plugins into a fresh scope for now
  Propagate zeek-version.h skip via CMake properties
2023-04-27 13:23:14 +02:00
Arne Welzel
004dce2cf2 Merge remote-tracking branch 'origin/topic/awelzel/zeekctl-multiple-loggers'
* origin/topic/awelzel/zeekctl-multiple-loggers:
  NEWS: Add entry for ZeekControl and multi-loggers
  Bump zeekctl to multi-logger version
  logging: Support rotation_postprocessor_command_env
2023-04-27 12:17:02 +02:00
Arne Welzel
ee91201785 Merge remote-tracking branch 'origin/topic/awelzel/topic/bump-zeekjs-0-9-0'
* origin/topic/awelzel/topic/bump-zeekjs-0-9-0:
  Update ZeekJS submodule to 0.9.0
2023-04-27 09:09:44 +02:00
Tim Wojtulewicz
b65697633f Merge remote-tracking branch 'origin/topic/vern/func-coverage'
* origin/topic/vern/func-coverage:
  extend ZEEK_PROFILER_FILE profiling to include summaries for functions/hooks/event handlers
2023-04-26 12:43:00 -07:00
Vern Paxson
5b98538c8b extend ZEEK_PROFILER_FILE profiling to include summaries for functions/hooks/event handlers 2023-04-26 12:23:52 -07:00
Jan Grashoefer
342d88fbd4 Simplify btests using cluster_started event. 2023-04-26 20:00:44 +02:00
Jan Grashoefer
4ddf7562b9 Remove old cluster start tests.
These tests should be redundant to the cluster_started tests found in
policy/frameworks/cluster.
2023-04-26 19:29:55 +02:00
Tim Wojtulewicz
ca2616e573 Modify Windows test cmd file to actually run tests 2023-04-26 09:17:52 -07:00
Arne Welzel
8f262df192 Merge remote-tracking branch 'origin/topic/awelzel/bump-af-packet'
* origin/topic/awelzel/bump-af-packet:
  Update AF-Packet submodule
  btest: Add af_packet to TestDirs
  Update AF-Packet submodule
2023-04-26 15:38:17 +02:00
Arne Welzel
cc7e35b39a Update AF-Packet submodule
Include Tim's cleanup and modernization fixes, too.
2023-04-26 15:36:50 +02:00
Arne Welzel
83dd7cf580 test/builtin-plugins: Add plugin using ZEEK_VERSION_NUMBER 2023-04-26 10:29:06 +02:00
Tim Wojtulewicz
08a039446f Add template file and cmake call for zeek-path setup on Windows 2023-04-25 15:15:04 -07:00
Tim Wojtulewicz
dd26990410 Merge remote-tracking branch 'origin/topic/timw/2324-llc-snap-and-novell-oh-my'
* origin/topic/timw/2324-llc-snap-and-novell-oh-my:
  Update docs and NEWS to include LLC, SNAP, and Novell packet analyzers
  Fix length checks in VLAN/Ethernet analyzers for non-ethertype protocols
  Add forwarding from VLAN analyzer into LLC, SNAP, and Novell 802.3 analyzers
  Remove non-standard way of forwarding out of the Ethernet analyzer
  Add basic LLC, SNAP, and Novell 802.3 packet analyzers
  ARP: add support for IEEE802 hardware type
2023-04-25 13:08:06 -07:00
Tim Wojtulewicz
965b36fe65 Update docs and NEWS to include LLC, SNAP, and Novell packet analyzers 2023-04-25 13:00:12 -07:00
Tim Wojtulewicz
7facd94e6f Fix length checks in VLAN/Ethernet analyzers for non-ethertype protocols 2023-04-25 12:29:55 -07:00
Tim Wojtulewicz
7aa7909c94 Add forwarding from VLAN analyzer into LLC, SNAP, and Novell 802.3 analyzers 2023-04-25 12:29:55 -07:00
Tim Wojtulewicz
c5b8603218 Remove non-standard way of forwarding out of the Ethernet analyzer 2023-04-25 12:29:55 -07:00
Tim Wojtulewicz
7e88a2b3fb Add basic LLC, SNAP, and Novell 802.3 packet analyzers 2023-04-25 12:29:54 -07:00
Tim Wojtulewicz
31afe082ac ARP: add support for IEEE802 hardware type 2023-04-25 12:12:49 -07:00
Tim Wojtulewicz
ff6ebb9257 Merge branch 'topic/timw/2167-aruba-expansion'
* topic/timw/2167-aruba-expansion:
  Add NEWS entry about 802.11 and ARUBA changes
  Remove workaround for tunnels from IEEE 802.11 analyzer
  PPP in the GRE analyzer is actually PP*T*P
  Add support for 802.11 A-MSDU aggregates
  Fix IEEE 802.11 analyzer to properly forward tunneled packets
  Fix IEEE 802.11 analyzer to skip packets with the Protected bit enabled
  Expand support for Aruba protocol types in GRE analyzer
  Default tunnel_type in iosource::Packet to NONE
2023-04-25 11:37:51 -07:00
Tim Wojtulewicz
43a2b39c05 Add NEWS entry about 802.11 and ARUBA changes 2023-04-25 11:37:30 -07:00
Tim Wojtulewicz
f62f8e5cc9 Remove workaround for tunnels from IEEE 802.11 analyzer 2023-04-25 09:28:20 -07:00
Tim Wojtulewicz
934207c05b PPP in the GRE analyzer is actually PP*T*P 2023-04-25 09:28:20 -07:00
Tim Wojtulewicz
2d05beac06 Add support for 802.11 A-MSDU aggregates 2023-04-25 09:28:20 -07:00
Tim Wojtulewicz
5b1c6216bd Fix IEEE 802.11 analyzer to properly forward tunneled packets
This mostly happens with Aruba, but could possibly happen with other tunnels too.
2023-04-25 09:28:20 -07:00
Tim Wojtulewicz
e4a1c30828 Fix IEEE 802.11 analyzer to skip packets with the Protected bit enabled 2023-04-25 09:28:20 -07:00
Tim Wojtulewicz
69d72f3bbb Expand support for Aruba protocol types in GRE analyzer
This also fixes the GRE analyzer to forward into the IEEE 802.11 analyzer
if it encounters Aruba packets with the proper protocol types. This way
the QoS header can be handled correctly.
2023-04-25 09:28:20 -07:00
Tim Wojtulewicz
1e6cc76c83 Default tunnel_type in iosource::Packet to NONE 2023-04-25 09:28:20 -07:00
Dominik Charousset
9971121509 Revert putting plugins into a fresh scope for now 2023-04-25 17:20:33 +02:00
Arne Welzel
aaf68a4e2c btest: Add af_packet to TestDirs 2023-04-25 14:51:18 +02:00
Arne Welzel
e856e953b8 Merge remote-tracking branch 'origin/topic/christian/sync-ignore_checksums-from-cli'
* origin/topic/christian/sync-ignore_checksums-from-cli:
  Given the -C flag, set script-layer ignore_checksums to true.
  Add btest for "-C" flag vs the script-layer ignore_checksums global.
2023-04-25 12:39:27 +02:00
Arne Welzel
ef7e714afd Update AF-Packet submodule
* Mask VLAN ID from tp_vlan_tci field to fix vlan > 4095 reported by Zeek
  when PCP and/or DEI bits are set.
* Descriptive error message when interface is down. Instead of
  "Invalid argument", Zeek now reports "interface is down".
2023-04-25 11:15:53 +02:00
Arne Welzel
d2c09676bb Update ZeekJS submodule to 0.9.0
* Performance improvements for the Redis Log::log_stream_policy example
  around PortVal wrapping and caching field offsets for property lookups.
* Debug output is now channeled through PLUGIN_DBG_LOG() and available via
  zeek -B plugin-Zeek-JavaScript instead of unconditionally on stderr.
* Reduced CMake output when Node.js isn't found
2023-04-25 11:03:48 +02:00