Commit graph

12530 commits

Author SHA1 Message Date
Tim Wojtulewicz
fbcebb85a1 Merge remote-tracking branch 'origin/topic/vern/CPP-trim'
* origin/topic/vern/CPP-trim:
  suppress unneeded initializations
  address clang 10 warnings
2021-11-29 13:46:14 -07:00
zeek-bot
d2a9fcda0c Update doc submodule [nomail] [skip ci] 2021-11-25 04:26:38 +00:00
Tim Wojtulewicz
8e1d770966 Merge remote-tracking branch 'origin/topic/vern/record-empty-vector-fix'
* origin/topic/vern/record-empty-vector-fix:
  fixes for constructing and assigning records with fields that are empty vectors
2021-11-24 13:32:45 -07:00
Vern Paxson
a2cec7463f suppress unneeded initializations 2021-11-24 12:17:16 -08:00
Vern Paxson
a830c269ab address clang 10 warnings 2021-11-24 11:56:01 -08:00
Vern Paxson
06bbd167cd fixes for constructing and assigning records with fields that are empty vectors 2021-11-24 11:16:33 -08:00
Tim Wojtulewicz
e0b4659488 Merge remote-tracking branch 'origin/topic/vern/CPP-speedup'
* origin/topic/vern/CPP-speedup:
  use iterator-based idiom for check-if-present-then-access
  const-ify member function
  switch looping over vectors to use iterators
  remove unused local variables
  efficiency fix - return a reference rather than a copy of a map
  fix for case-sensitive file systems
  geez sometimes it's signed sometimes it's not
  documentation updates
  remove -O add-C++ and -O update-C++ options
  extensive rewrite of generation & execution of run-time initialization
  factoring out CPPEscape to be a standalone function
  removing unused SubNetType class
2021-11-23 19:44:57 -07:00
Tim Wojtulewicz
e86a606d18 Merge remote-tracking branch 'origin/topic/timw/1571-move-tunnel-analyzers-2'
* origin/topic/timw/1571-move-tunnel-analyzers-2:
  Update NEWS and some minor fixes for docs/zeekygen
  Remove the old session-based tunnel analyzers
  Add GTPv1 packet analyzer, disable old analyzer
  Add Teredo packet analyzer, disable old analyzer
  Add VXLAN packet analyzer, disable old analyzer
  Add Geneve packet analyzer, disable old analyzer
  Add AYIYA packet analyzer, disable old analyzer
  Add PacketAnalyzer::register_for_port(s) functions
  Add analyzer_confirmation and analyzer_violation events
  Add utility function for tunnel analyzers to setup encapsulation
  Store some additional information in the packet during processing
  Minor fix in UDP to avoid duplicating tunnels
  Fix error text in IPTunnel analyzer
  Change Packet::ip_hdr to be a shared_ptr so it can be copied into EncapsulatingConn
  Add method for packet analyzers to register for protocol detection
  Add concept of "parent" tag namespaces
  Unify plugin::Component and plugin::TaggedComponent into a single class
  Remove uses of deprecated Tag types
  Unify all of the Tag types into one type
2021-11-23 19:42:15 -07:00
Tim Wojtulewicz
e82a78616b Update NEWS and some minor fixes for docs/zeekygen 2021-11-23 19:39:36 -07:00
Tim Wojtulewicz
9135345fa8 Remove the old session-based tunnel analyzers 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
2044fbe53b Add GTPv1 packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
dc0ecf9811 Add Teredo packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
05574ecce1 Add VXLAN packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
cbb0bcd49c Add Geneve packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
7e40094f2c Add AYIYA packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
44e0760e96 Add PacketAnalyzer::register_for_port(s) functions
These allow packet analyzers to register ports as identifiers to forward from
parent analyzers, while also adding those ports to the now-global
Analyzer::ports table at the same time.
2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
612212568a Add analyzer_confirmation and analyzer_violation events 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
7bffd2eccd Add utility function for tunnel analyzers to setup encapsulation 2021-11-23 19:36:50 -07:00
Tim Wojtulewicz
f93c5a6942 Store some additional information in the packet during processing
- Session related to the packet
- is_orig information if a UDP header was found
2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
5f58ce8a5d Minor fix in UDP to avoid duplicating tunnels 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
1dede6dd70 Fix error text in IPTunnel analyzer 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
ed798c6aba Change Packet::ip_hdr to be a shared_ptr so it can be copied into EncapsulatingConn 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
d4f57a6100 Add method for packet analyzers to register for protocol detection 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
a7d3cb48ef Add concept of "parent" tag namespaces
This allows us to create an EnumType that groups all of the analyzer
tag values into a single type, while still having the existing types
that split them up. We can then use this for certain events that benefit
from taking all of the tag types at once.
2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
7d66f4252f Unify plugin::Component and plugin::TaggedComponent into a single class
These two are almost always used in conjunction with each other, and
TaggedComponent is never used by itself. Combining them together into
a single class will help simplify some of the code around managing
the mapping between Tags and Components.
2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
8b544d648d Remove uses of deprecated Tag types 2021-11-23 19:36:49 -07:00
Tim Wojtulewicz
331161138a Unify all of the Tag types into one type
- Remove tag types for each component type (analyzer, etc)
- Add deprecated versions of the old types
- Remove unnecessary tag element from templates for TaggedComponent and ComponentManager
- Enable TaggedComponent to pass an EnumType when initializing Tag objects
- Update some tests that are affected by the tag enum values changing order
2021-11-23 19:36:49 -07:00
zeek-bot
4f9f46a0c4 Update doc submodule [nomail] [skip ci] 2021-11-24 00:42:06 +00:00
Johanna Amann
3fe6ad1a82 Merge remote-tracking branch 'origin/topic/johanna/gh-1829-test'
* origin/topic/johanna/gh-1829-test:
  Add testcase for TCP segment offloading.
2021-11-23 15:35:35 +00:00
Johanna Amann
3846f69f38 Merge remote-tracking branch 'origin/topic/johanna/openssl-3-compat'
* origin/topic/johanna/openssl-3-compat:
  Update cmake submodule for OpenSSL 3.0 changes
  OpenSSL 3: normalize self-signed-cert error message
  Make cmake & ci like OpenSSL 3.0
  Add OpenSSL 3.0 CI test
  OpenSSL 3: fix warnings and tests
  Switch OpaqueVal hashing back to legacy OpenSSL implementation

Fixes GH-1379
2021-11-23 13:48:26 +00:00
Johanna Amann
d3f16af4ab Add testcase for TCP segment offloading.
Relates to GH-1829
2021-11-23 12:37:55 +00:00
Johanna Amann
12d81b27ed Merge remote-tracking branch 'origin/master' into topic/johanna/openssl-3-compat 2021-11-23 10:23:12 +00:00
Johanna Amann
48ee7db3c1 Merge remote-tracking branch 'origin/topic/johanna/gh-1829'
* origin/topic/johanna/gh-1829:
  Add documentation for GH-1829
  Packets with TSO: address review feedback.
  Accept packets that use tcp segment offloading.

Fixes GH-1829
2021-11-23 10:20:07 +00:00
Vern Paxson
84423369b4 use iterator-based idiom for check-if-present-then-access 2021-11-22 15:28:15 -08:00
Vern Paxson
735d584d9f const-ify member function 2021-11-22 10:55:38 -08:00
Christian Kreibich
f6a9dc416e Updates to NEWS to cover recent additions. [nomail] [skip ci] 2021-11-18 17:25:36 -08:00
Christian Kreibich
ee28e3e8b1 Update doc and auxil/zeek-aux submodules [nomail] [skip ci] 2021-11-18 17:09:40 -08:00
Vern Paxson
ffbbacd3b1 switch looping over vectors to use iterators 2021-11-18 08:58:04 -08:00
Vern Paxson
6f82c1610e remove unused local variables 2021-11-18 08:57:03 -08:00
Vern Paxson
8e77e3e92c efficiency fix - return a reference rather than a copy of a map 2021-11-18 08:56:24 -08:00
Johanna Amann
0b517c01e0 Update cmake submodule for OpenSSL 3.0 changes 2021-11-18 07:44:01 +00:00
Christian Kreibich
67cbec9123 Update cmake and aux/zeek-aux submodules [nomail] [skip ci] 2021-11-17 16:42:04 -08:00
Christian Kreibich
c9229b68cf Merge branch 'topic/christian/fix-docker-doublebuild'
* topic/christian/fix-docker-doublebuild:
  Clean up fully after successful Docker btests
2021-11-17 11:58:13 -08:00
Johanna Amann
ff0bc86021 OpenSSL 3: normalize self-signed-cert error message
The message changed between OpenSSL 1.1 and 3.0 - we just use the old
one to not mess up the external test baselines.
2021-11-17 17:21:21 +00:00
Johanna Amann
0dc8dfacb7 Make cmake & ci like OpenSSL 3.0
Older cmake versions have problems with the version number. When
installing OpenSSL on a 64 bit linux one also needs to create an
additional symlink to get cmake to use the correct library.
2021-11-17 14:57:23 +00:00
Johanna Amann
ce38b5a056 Add OpenSSL 3.0 CI test 2021-11-17 13:33:49 +00:00
Johanna Amann
253d214126 OpenSSL 3: fix warnings and tests
This commit fixes the compile-time warnings that OpenSSL 3.0 raises for
our source-code. For the cases where this was necessary we now have two
implementations - one for OpenSSL 1.1 and earlier, and one for OpenSSL
3.0.

This also makes our testsuite pass with OpenSSL 3.0

Relates to GH-1379
2021-11-17 13:33:49 +00:00
Christian Kreibich
1dd6c1d716 Clean up fully after successful Docker btests
If we leave files sitting around, we trigger a Docker image double-build in CI,
because the build runs once, gets tested, and then gets run again when we push
the Docker image: the additional btest files cause Docker to detect a different
source tree, causing an image layer violation.

Also rename "cleanup" target to "clean", to align with rest of our tree.
2021-11-16 15:13:10 -08:00
Johanna Amann
6217851d6d Switch OpaqueVal hashing back to legacy OpenSSL implementation
This commit switches hashing from the more modern EVP message digest to
the older direct function calls, that are deprecated as of OpenSSL 3.0.

The reason is that we require the ability to store the internal state of
hash operations to disk. This is no longer possible with the
architecture that is used by the EVP digests; it is, however, possible
when using the legacy methods.

There might be a way to do this more cleanly in OpenSSL 3.1 - but for
the moment this seems like the easiest solution - even though I am not
really happy about it.

For details see zeek/zeek#1379 and openssl/openssl#14222
2021-11-16 15:33:31 +00:00
Johanna Amann
14f919895d Add documentation for GH-1829
This adds documentation that clarifies that the `ignore_checksums`
option now also allows IPv4 packets with a length of 0.
2021-11-16 13:51:29 +00:00