mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
scan.l: Deprecate DNS resolutions of hostname literals
This also skips DNS lookups when running with zeek --parse-only. Closes #4216 #4219
This commit is contained in:
parent
e14f54b474
commit
715c309b03
12 changed files with 52 additions and 4 deletions
|
@ -1,9 +1,11 @@
|
|||
# We once had a bug where DNS lookups at init time lead to an immediate crash.
|
||||
#
|
||||
# @TEST-EXEC: zeek -b %INPUT >output 2>&1
|
||||
# @TEST-EXEC: btest-diff output
|
||||
# @TEST-EXEC: zeek -b %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
|
||||
const foo: set[addr] = {
|
||||
google.com
|
||||
};
|
||||
|
||||
print foo;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# @TEST-EXEC: ZEEK_DNS_FAKE=1 zeek -D -b %INPUT >out
|
||||
# @TEST-EXEC: ZEEK_DNS_FAKE=1 zeek -D -b %INPUT >out 2>err
|
||||
# @TEST-EXEC: btest-diff out
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff err
|
||||
|
||||
redef exit_only_after_terminate = T;
|
||||
|
||||
|
|
11
testing/btest/core/hostname-literal-resolve.zeek
Normal file
11
testing/btest/core/hostname-literal-resolve.zeek
Normal file
|
@ -0,0 +1,11 @@
|
|||
# @TEST-DOC: Testing deprecated hostname literal resolutions
|
||||
#
|
||||
# @TEST-EXEC: zeek --parse-only -b %INPUT 2>err.parse-only >out.parse-only
|
||||
# @TEST-EXEC: zeek -b %INPUT 2>err >out
|
||||
#
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff err.parse-only
|
||||
# @TEST-EXEC: btest-diff out.parse-only
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff err
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
print "dns.example.com", dns.example.com;
|
Loading…
Add table
Add a link
Reference in a new issue