mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Working around not being able to do lookup_addr() for IPv6
addresses. Rather than crashing, we warn the user once and then always time out the call. This addresses #291, and a #355 is new ticket scheduling fixing the actual problem to later.
This commit is contained in:
parent
ffaa20602c
commit
bbbe32e443
2 changed files with 19 additions and 3 deletions
|
@ -130,11 +130,17 @@ Trigger::Trigger(Expr* arg_cond, Stmt* arg_body, Stmt* arg_timeout_stmts,
|
|||
|
||||
Val* timeout = arg_timeout ? arg_timeout->ExprVal() : 0;
|
||||
|
||||
// Make sure we don't get deleted if somebody calls a method like
|
||||
// Timeout() while evaluating the trigger.
|
||||
Ref(this);
|
||||
|
||||
if ( ! Eval() && timeout )
|
||||
{
|
||||
timer = new TriggerTimer(timeout->AsInterval(), this);
|
||||
timer_mgr->Add(timer);
|
||||
}
|
||||
|
||||
Unref(this);
|
||||
}
|
||||
|
||||
Trigger::~Trigger()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue