diff --git a/CHANGES b/CHANGES index 892fb570ee..21fdfbfefd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +8.0.0-dev.330 | 2025-06-02 14:30:41 -0700 + + * Bump Spicy to pull in fix. (Robin Sommer, Corelight) + + Includes a new regression test. + + Closes #4501. + 8.0.0-dev.328 | 2025-06-02 11:45:03 -0700 * Bump zeekjs to v0.17.1 (Arne Welzel, Corelight) diff --git a/VERSION b/VERSION index fe507bca1e..80dc86a158 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.0-dev.328 +8.0.0-dev.330 diff --git a/auxil/spicy b/auxil/spicy index 4fe22b915e..9924442281 160000 --- a/auxil/spicy +++ b/auxil/spicy @@ -1 +1 @@ -Subproject commit 4fe22b915e5f1ac26c08412fed2bfc2dbc36bfb3 +Subproject commit 992444228151b193379e93403f8d486a6bf37878 diff --git a/testing/btest/Baseline/spicy.tcp-eod-behavior-on-destroy/output b/testing/btest/Baseline/spicy.tcp-eod-behavior-on-destroy/output new file mode 100644 index 0000000000..2ddebedb7a --- /dev/null +++ b/testing/btest/Baseline/spicy.tcp-eod-behavior-on-destroy/output @@ -0,0 +1,8 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +INIT, (192.168.72.14, 3254/tcp, 65.54.95.206, 80/tcp), True +INIT, (192.168.72.14, 3254/tcp, 65.54.95.206, 80/tcp), False +DONE, (192.168.72.14, 3254/tcp, 65.54.95.206, 80/tcp), False +INIT, (192.168.72.14, 3257/tcp, 65.54.95.14, 80/tcp), True +INIT, (192.168.72.14, 3257/tcp, 65.54.95.14, 80/tcp), False +DONE, (192.168.72.14, 3257/tcp, 65.54.95.14, 80/tcp), False +DONE, (192.168.72.14, 3257/tcp, 65.54.95.14, 80/tcp), True diff --git a/testing/btest/spicy/tcp-eod-behavior-on-destroy.zeek b/testing/btest/spicy/tcp-eod-behavior-on-destroy.zeek new file mode 100644 index 0000000000..516522557f --- /dev/null +++ b/testing/btest/spicy/tcp-eod-behavior-on-destroy.zeek @@ -0,0 +1,39 @@ +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: spicyz -d foo.spicy foo.evt -o foo.hlto +# @TEST-EXEC: zeek -Cr ${TRACES}/http/206_example_b.pcap foo.hlto "Spicy::enable_print=T" >output 2>&1 +# @TEST-EXEC: btest-diff output +# +# @TEST-DOC: Exercise &eod behavior when processing is aborted without a regular connection shutdown; regression test for Zeek #4501. +# +# @TEST-START-FILE foo.spicy +module foo; + +import zeek; + +public type X = unit { + : bytes &eod; + + on %init() { + print "INIT", zeek::conn_id(), zeek::is_orig(); + } + + on %done() { + print "DONE", zeek::conn_id(), zeek::is_orig(); # should not be called for instance not reaching &eod + } + + on %error(e: string) { + print "ERROR: %s - should not show up" % e; + } + +}; + +# @TEST-END-FILE + +# @TEST-START-FILE foo.evt +import foo; + +protocol analyzer X over TCP: + parse with foo::X, + port 0/tcp-65535/tcp; +# @TEST-END-FILE