Commit graph

18601 commits

Author SHA1 Message Date
Arne Welzel
c426304c27 Val: Move TablePatternMatcher into detail namespace
There's anyway only prototype in the headers, so detail seems better
than the public zeek namespace.
2023-11-21 10:34:16 +01:00
Arne Welzel
43a5473919 TablePatternMatcher: Use unique_ptr 2023-11-21 10:34:16 +01:00
Arne Welzel
c8bab6a0ec IndexType: Add IsPatternIndex(), like IsSubNetIndex() 2023-11-21 10:34:16 +01:00
Arne Welzel
074f51fc96 btest: Add test for pattern tables and when 2023-11-21 10:34:16 +01:00
Arne Welzel
b55e1a122e Reuse CompileSet() instead of || string formatting 2023-11-21 10:34:16 +01:00
Vern Paxson
61fcca8482 script optimization support for using strings to index table[pattern] values 2023-11-21 10:34:16 +01:00
Vern Paxson
fd1094a184 BTests for indexing "table[pattern] of T" with strings 2023-11-21 10:34:15 +01:00
Vern Paxson
699549eb45 support for indexing "table[pattern] of T" with strings to get multi-matches 2023-11-21 10:34:15 +01:00
Arne Welzel
a5a79d3f3a Merge remote-tracking branch 'origin/topic/awelzel/3453-dnssec-ed448-ed25519'
* origin/topic/awelzel/3453-dnssec-ed448-ed25519:
  DNS: Add Ed25519 and Ed448 enum values to parser
2023-11-21 10:08:34 +01:00
Arne Welzel
2dfbfdc4aa Merge remote-tracking branch 'origin/topic/awelzel/possible-re-fixes'
* origin/topic/awelzel/possible-re-fixes:
  RE_Match_State: Do not reset current_pos for every Match() call
2023-11-21 10:06:26 +01:00
Arne Welzel
c58f3149b3 Merge remote-tracking branch 'origin/topic/awelzel/3455-sub-gsub-anchors'
* origin/topic/awelzel/3455-sub-gsub-anchors:
  frameworks/software: Fix stale value used for stripping
  strings.bif/sub,gsub: Respect anchors in pattern
2023-11-21 10:04:49 +01:00
zeek-bot
1bfeb548db Update doc submodule [nomail] [skip ci] 2023-11-21 00:12:29 +00:00
Arne Welzel
81aa6b14fd DNS: Add Ed25519 and Ed448 enum values to parser
We already had these declared in dns/const.zeek, so extend the parser
as well to avoid raising weirds and add some test pcaps:

   $ dig @8.8.8.8 DNSKEY ed448.no
   $ dig @8.8.8.8 ed448.no +dnssec

And the same for the ed25519.no domain.

Closes #3453
2023-11-17 19:56:47 +01:00
Arne Welzel
56830948e3 RE_Match_State: Do not reset current_pos for every Match() call
This seems like a bug: If one feeds one byte at a time, current_pos
is being reset for every byte, possibly reporting the wrong offsets
in the accepted_matches map.
2023-11-17 18:16:20 +01:00
Arne Welzel
b0a200a5dc Merge remote-tracking branch 'origin/topic/vern/zam-EH-coalesce'
* origin/topic/vern/zam-EH-coalesce:
  BTest updates to accommodate event handler coalescence differences
  BTests for testing that event handler coalescence operates as expected
  coalescing of event handlers (ZAM optimization)

Minor fixups during merge as commented on the PR.
2023-11-17 18:05:32 +01:00
Tim Wojtulewicz
de77b034c2 Merge remote-tracking branch 'origin/topic/timw/opensuse-ci-fixes'
* origin/topic/timw/opensuse-ci-fixes:
  CI: Install missing packages on opensuse
2023-11-17 09:24:44 -07:00
Tim Wojtulewicz
a3ad1a24f1 CI: Install missing packages on opensuse 2023-11-17 09:24:15 -07:00
Arne Welzel
37113b4de6 frameworks/software: Fix stale value used for stripping
There was some confusion around which value was used subsequent to a strip(),
but sub not respecting anchors make it appear to work. Also seems that the
`\(?` part seems redundant.
2023-11-17 14:37:28 +01:00
Arne Welzel
e339e93e69 strings.bif/sub,gsub: Respect anchors in pattern
Anchors within pattern passed to sub() or gsub() were previously ignored,
replacing any occurrence of '<text>' even when '^<text>' was used as a
pattern.

This is a pretty user-visible change (and we even have anchored patterns
within the base scripts), but seems "the right thing to do".

Relates to #3455
2023-11-17 14:37:25 +01:00
Arne Welzel
d9b8154c4e Merge remote-tracking branch 'origin/topic/awelzel/3455-do-split-string-2'
* origin/topic/awelzel/3455-do-split-string-2:
  strings.bif/do_split_string: Pass bol and eol to MatchPrefix()
  RE_Matcher: Add MatchPrefix with bol/eol control
2023-11-17 13:01:47 +01:00
Vern Paxson
fc2796a5a4 BTest updates to accommodate event handler coalescence differences 2023-11-16 13:04:35 -08:00
Vern Paxson
39e1f71ebf BTests for testing that event handler coalescence operates as expected 2023-11-16 13:03:40 -08:00
Vern Paxson
3d21d80dac coalescing of event handlers (ZAM optimization) 2023-11-16 12:58:28 -08:00
Arne Welzel
98d9089a8f strings.bif/do_split_string: Pass bol and eol to MatchPrefix()
This allows better control of BOL and EOL. MatchPrefix() / LongestMatch()
always start with BOL.

Closes #3455
2023-11-16 08:36:08 +01:00
Arne Welzel
a3bd3e4c50 RE_Matcher: Add MatchPrefix with bol/eol control 2023-11-16 08:25:57 +01:00
zeek-bot
4751f6f31e Update doc submodule [nomail] [skip ci] 2023-11-15 00:10:11 +00:00
Arne Welzel
abc32b3b46 Merge remote-tracking branch 'origin/topic/neverlord/coverity-1523915'
* origin/topic/neverlord/coverity-1523915:
  Bind scan_path to the scope; avoid heap allocation
2023-11-11 17:46:04 +01:00
Dominik Charousset
e7aa87f35c Bind scan_path to the scope; avoid heap allocation 2023-11-11 16:39:22 +01:00
zeek-bot
eac76c015e Update doc submodule [nomail] [skip ci] 2023-11-11 00:22:32 +00:00
Arne Welzel
a488dcffb6 Merge remote-tracking branch 'origin/topic/vern/script-opt.Nov23'
* origin/topic/vern/script-opt.Nov23:
  retention of superseded AST elements to prevent pointer mis-aliasing
  BTest updates for latest ZAM maintenance
  greater ZAM optimization of inlined function calls
  some minor ZAM optimization improvements
  added "-O noinline" option to turn off ZAM inlining, to help with diagnosing optimization problems
  fixes for a number of ZAM optimization bugs
  allow explicitly marking an identifier as equivalent to special '_' identifier
  fixed some warnings about mixing signed & unsigned integers
  descriptions of "for" statements now include their "value variable" if present
2023-11-10 12:43:08 +01:00
Vern Paxson
4ec9a23ce6 retention of superseded AST elements to prevent pointer mis-aliasing 2023-11-10 11:06:16 +01:00
Vern Paxson
280acc51bf BTest updates for latest ZAM maintenance 2023-11-10 09:57:35 +01:00
Vern Paxson
b489cfc508 greater ZAM optimization of inlined function calls 2023-11-10 09:57:35 +01:00
Vern Paxson
e3b75ac391 some minor ZAM optimization improvements 2023-11-10 09:57:35 +01:00
Vern Paxson
fadda05782 added "-O noinline" option to turn off ZAM inlining, to help with diagnosing optimization problems 2023-11-10 09:57:35 +01:00
Vern Paxson
1dc74eaa9c fixes for a number of ZAM optimization bugs 2023-11-10 09:56:59 +01:00
Vern Paxson
9bfe18473d allow explicitly marking an identifier as equivalent to special '_' identifier 2023-11-10 09:56:59 +01:00
Vern Paxson
c49918ba8b fixed some warnings about mixing signed & unsigned integers 2023-11-10 09:56:59 +01:00
Vern Paxson
23c08a05de descriptions of "for" statements now include their "value variable" if present 2023-11-10 09:56:51 +01:00
zeek-bot
9356330bce Update doc submodule [nomail] [skip ci] 2023-11-10 00:26:02 +00:00
Robin Sommer
2498f7dbe9
Merge remote-tracking branch 'origin/topic/robin/gh-3443-skip'
* origin/topic/robin/gh-3443-skip:
  Spicy: Provide `zeek::skip_input()` to disable deliver to current analyzer.
2023-11-09 17:22:48 +01:00
Robin Sommer
f5aa5c3466
Spicy: Provide zeek::skip_input() to disable deliver to current analyzer.
```
## Tells Zeek to skip sending any further input data to the current analyzer.
## This is supported for protocol and file analyzers.
public function skip_input() : void;
```

Closes #3443.
2023-11-09 10:43:49 +01:00
Arne Welzel
a7e1841be1 Merge remote-tracking branch 'origin/topic/awelzel/btest-test-dirs-add-opt-and-misc'
* origin/topic/awelzel/btest-test-dirs-add-opt-and-misc:
  btest/opt: Update pure-inlining baseline
  btest/opt: Update basic baseline
  Expr: Fix alloc-dealloc-mismatch
  btest: Move zam/basic.test into opt/basic.test, update TestDirs
2023-11-09 10:42:49 +01:00
Arne Welzel
3174999445 btest/opt: Update pure-inlining baseline
I suspect this as just stale due to not being executed regularly.
2023-11-08 16:23:22 +01:00
Arne Welzel
e7f010d14e btest/opt: Update basic baseline 2023-11-08 15:54:55 +01:00
Arne Welzel
273fb9b79e Expr: Fix alloc-dealloc-mismatch
I *thought* Vern had fixed this up, but maybe that was another
occurrence.
2023-11-08 15:52:58 +01:00
Arne Welzel
60e997a3fd btest: Move zam/basic.test into opt/basic.test, update TestDirs
It seems "opt" can and should run unconditionally. The "misc" dir was
definitely an oversight.
2023-11-08 15:46:54 +01:00
Johanna Amann
5fffc1586a Spicy TLS: skip CI; run performance tests 2023-11-08 13:14:35 +00:00
Arne Welzel
de5fa1087a Add deprecations to NEWS [nomail] [skipci] 2023-11-08 11:27:53 +01:00
Johanna Amann
dda1bbb7fc Spicy TLS: fix parsing of no-extension hellos, port registration
Parsing of client/server hellos that do not contain extensions should
now work correctly.

The port registration is now done Zeek-side, wich fixes some test
failures.
2023-11-08 08:00:49 +00:00