mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
RunState: Implement forward_network_time_if_applicable()
Add a central place where the decision when it's okay to update network time to the current time (wallclock) is. It checks for pseudo_realtime and packet source existence as well as packet source idleness. A new const &redef allows to completely disable forwarding of network time.
This commit is contained in:
parent
eefa0150b9
commit
d4e31e7d2b
4 changed files with 80 additions and 13 deletions
|
@ -1036,7 +1036,8 @@ SetupResult setup(int argc, char** argv, Options* zopts)
|
|||
segment_logger = profiling_logger;
|
||||
}
|
||||
|
||||
if ( ! run_state::reading_live && ! run_state::reading_traces )
|
||||
if ( ! run_state::reading_live && ! run_state::reading_traces &&
|
||||
id::find_const("allow_network_time_forward")->AsBool() )
|
||||
// Set up network_time to track real-time, since
|
||||
// we don't have any other source for it.
|
||||
run_state::detail::update_network_time(util::current_time());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue