mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Fixing bug with even priorities potentially being ignored for the
handler.
This commit is contained in:
parent
9709b1d522
commit
bff8d39428
5 changed files with 7 additions and 9 deletions
|
@ -16,10 +16,6 @@ event do_reply(c: connection, msg: dns_msg, ans: dns_answer, reply: string) &pri
|
|||
# The "ready" flag will be set here. This causes the setting from the
|
||||
# base script to be overridden since the base script will log immediately
|
||||
# after all of the ANS replies have been seen.
|
||||
|
||||
if ( ! c?$dns )
|
||||
print c$id;
|
||||
|
||||
c$dns$ready=F;
|
||||
|
||||
if ( ans$answer_type == DNS_AUTH )
|
||||
|
|
|
@ -236,7 +236,7 @@ TraversalCode Func::Traverse(TraversalCallback* cb) const
|
|||
}
|
||||
|
||||
BroFunc::BroFunc(ID* arg_id, Stmt* arg_body, id_list* aggr_inits,
|
||||
int arg_frame_size)
|
||||
int arg_frame_size, int priority)
|
||||
: Func(BRO_FUNC)
|
||||
{
|
||||
id = arg_id;
|
||||
|
@ -246,7 +246,7 @@ BroFunc::BroFunc(ID* arg_id, Stmt* arg_body, id_list* aggr_inits,
|
|||
{
|
||||
Body b;
|
||||
b.stmts = AddInits(arg_body, aggr_inits);
|
||||
b.priority = 0;
|
||||
b.priority = priority;
|
||||
bodies.push_back(b);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ protected:
|
|||
|
||||
class BroFunc : public Func {
|
||||
public:
|
||||
BroFunc(ID* id, Stmt* body, id_list* inits, int frame_size);
|
||||
BroFunc(ID* id, Stmt* body, id_list* inits, int frame_size, int priority);
|
||||
~BroFunc();
|
||||
|
||||
int IsPure() const;
|
||||
|
|
|
@ -178,7 +178,7 @@ static void make_var(ID* id, BroType* t, init_class c, Expr* init,
|
|||
// For events, add a function value (without any body) here so that
|
||||
// we can later access the ID even if no implementations have been
|
||||
// defined.
|
||||
Func* f = new BroFunc(id, 0, 0, 0);
|
||||
Func* f = new BroFunc(id, 0, 0, 0, 0);
|
||||
id->SetVal(new Val(f));
|
||||
id->SetConst();
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ void end_func(Stmt* body, attr_list* attrs)
|
|||
id->ID_Val()->AsFunc()->AddBody(body, inits, frame_size, priority);
|
||||
else
|
||||
{
|
||||
Func* f = new BroFunc(id, body, inits, frame_size);
|
||||
Func* f = new BroFunc(id, body, inits, frame_size, priority);
|
||||
id->SetVal(new Val(f));
|
||||
id->SetConst();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto trans_id query qclass qclass_name qtype qtype_name rcode rcode_name QR AA TC RD RA Z TTL answers auth addl
|
||||
930613226.52907 UWkUyAuUGXf 212.180.42.100 25000 131.243.64.3 53 tcp 34798 - - - - - 0 NOERROR F F F F T 0 31337.0 4.3.2.1 - -
|
Loading…
Add table
Add a link
Reference in a new issue