zeek/testing/btest/scripts/base/frameworks
Christian Kreibich f97a33e14d Fix type clash fatal error with log filters that use $ext_func and $include/$exclude
The logging manager's Manager::TraverseRecord(), called when adding a
log filter to a stream, skipped any fields intoduced by a filter's
$ext_func when such fields weren't mentioned in a $include restriction
or mentioned in an $exclude restriction. This was inconsistent with
Manager::RecordToFilterVals, used when actually writing log entries,
which does include those values.

The result was that the record indices descent in Manager::RecordToFilterVals
expects to find only record values, when in fact only the record
provided by ext_func is present. This leads to type mismatches and
hard Zeek exits like this one:

1300475173.475401 fatal error in zeek/share/zeek//base/init-bare.zeek, line 4810: Val::CONVERTER (string/record) (zeek)

The fix makes ext_func's field additions decisive, meaning the
filter's include/exclude lists don't apply to it. If a user really
wants to override this, they can reset the filter's ext_func back to
our no-op default.

The included btest produces the above error when the fix is not present.
2020-11-10 18:13:16 -08:00
..
analyzer General btest cleanup 2020-08-11 11:26:22 -07:00
cluster General btest cleanup 2020-08-11 11:26:22 -07:00
config Improve stability of config/cluster_resend btest 2020-08-20 16:26:46 -07:00
control Avoid race condition in control/id_value btest 2020-09-22 14:11:17 -07:00
dpd Add DPD::max_violations option 2019-07-19 13:00:02 -07:00
file-analysis General btest cleanup 2020-08-11 11:26:22 -07:00
input Merge remote-tracking branch 'origin/topic/seth/config-reader-musl-support' 2020-08-12 19:50:43 +00:00
intel Potentially improve intel/remove-item-cluster btest 2020-08-27 18:01:33 -07:00
logging Fix type clash fatal error with log filters that use $ext_func and $include/$exclude 2020-11-10 18:13:16 -08:00
netcontrol General btest cleanup 2020-08-11 11:26:22 -07:00
notice Improve notice/suppression-cluster btest to avoid race potential 2020-09-14 12:28:25 -07:00
openflow Adjust more btest timings 2020-08-11 11:26:22 -07:00
packet-filter General btest cleanup 2020-08-11 11:26:22 -07:00
reporter General btest cleanup 2020-08-11 11:26:22 -07:00
software General btest cleanup 2020-08-11 11:26:22 -07:00
sumstats Adjust more btest timings 2020-08-11 11:26:22 -07:00