mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/timw/2997-ding-dong-bro-init-is-dead'
* origin/topic/timw/2997-ding-dong-bro-init-is-dead: Remove parser error message for bro_init, et al
This commit is contained in:
commit
7305f2ba9b
8 changed files with 10 additions and 33 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
||||||
|
6.0.0-dev.489 | 2023-05-03 09:31:19 -0700
|
||||||
|
|
||||||
|
* Remove parser error message for bro_init, et al (Tim Wojtulewicz, Corelight)
|
||||||
|
|
||||||
6.0.0-dev.487 | 2023-05-03 09:30:55 -0700
|
6.0.0-dev.487 | 2023-05-03 09:30:55 -0700
|
||||||
|
|
||||||
* Add additional length check to IEEE 802.11 analyzer (Tim Wojtulewicz, Corelight)
|
* Add additional length check to IEEE 802.11 analyzer (Tim Wojtulewicz, Corelight)
|
||||||
|
|
5
NEWS
5
NEWS
|
@ -59,6 +59,11 @@ Breaking Changes
|
||||||
|
|
||||||
- The IRC_Data analyzer declaration has been moved to protocols/irc/IRC.h.
|
- The IRC_Data analyzer declaration has been moved to protocols/irc/IRC.h.
|
||||||
|
|
||||||
|
- The error message returned when using ``bro_init``, ``bro_done``, and
|
||||||
|
``bro_script_loaded`` events is now removed. removed. Usage of these events
|
||||||
|
has returned that error during script parsing for a few years, and time has
|
||||||
|
come to finally remove it.
|
||||||
|
|
||||||
New Functionality
|
New Functionality
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
6.0.0-dev.487
|
6.0.0-dev.489
|
||||||
|
|
|
@ -1488,13 +1488,6 @@ func_hdr:
|
||||||
}
|
}
|
||||||
| TOK_EVENT event_id func_params opt_attr
|
| TOK_EVENT event_id func_params opt_attr
|
||||||
{
|
{
|
||||||
const char* name = $2->Name();
|
|
||||||
if ( util::streq("bro_init", name) || util::streq("bro_done", name) || util::streq("bro_script_loaded", name) )
|
|
||||||
{
|
|
||||||
auto base = std::string(name).substr(4);
|
|
||||||
reporter->Error("event %s() is no longer available, use zeek_%s() instead", name, base.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
begin_func({NewRef{}, $2}, current_module.c_str(),
|
begin_func({NewRef{}, $2}, current_module.c_str(),
|
||||||
FUNC_FLAVOR_EVENT, false, {NewRef{}, $3},
|
FUNC_FLAVOR_EVENT, false, {NewRef{}, $3},
|
||||||
std::unique_ptr<std::vector<AttrPtr>>{$4});
|
std::unique_ptr<std::vector<AttrPtr>>{$4});
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
|
||||||
error in <...>/bro_init.zeek, line 5: event bro_init() is no longer available, use zeek_init() instead
|
|
||||||
error in <...>/bro_init.zeek, line 10: event bro_done() is no longer available, use zeek_done() instead
|
|
|
@ -1,2 +0,0 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
|
||||||
error in <...>/bro_script_loaded.zeek, line 5: event bro_script_loaded() is no longer available, use zeek_script_loaded() instead
|
|
|
@ -1,12 +0,0 @@
|
||||||
# @TEST-EXEC-FAIL: zeek -b %INPUT >out 2>&1
|
|
||||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
|
|
||||||
|
|
||||||
event bro_init()
|
|
||||||
{
|
|
||||||
print "ran bro_init()";
|
|
||||||
}
|
|
||||||
|
|
||||||
event bro_done()
|
|
||||||
{
|
|
||||||
print "ran bro_done()";
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
# @TEST-EXEC-FAIL: zeek -b %INPUT >out 2>&1
|
|
||||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
|
|
||||||
|
|
||||||
event bro_script_loaded(path: string, level: count) &priority=5
|
|
||||||
{
|
|
||||||
if ( /zeek_script_loaded.zeek/ in path )
|
|
||||||
print "bro_script_loaded priority 5";
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue