Merge remote branch 'origin/topic/robin/logging-internals' into topic/policy-scripts-new

This commit is contained in:
Seth Hall 2011-04-19 20:35:00 -04:00
commit 7a1fd6498c
9 changed files with 35 additions and 8 deletions

@ -1 +1 @@
Subproject commit c3c7ef0dfddb0746d3762e41086ba42928e68483 Subproject commit 26d02716f9090651f319a4bfdf8ede49b3a7b53a

@ -1 +1 @@
Subproject commit 98f92eeb40281045159097764abddc428fb49bf2 Subproject commit 7e50bac938af1831ecf9660159145a3c2e77e13d

@ -1 +1 @@
Subproject commit 48d473398e577893b6c7f77d605ccdf266a2f93b Subproject commit 9332ab3467191ac22be09d6941ebd469e7a334d0

@ -1 +1 @@
Subproject commit 532dcd5aa51c8b29b2d71cd37e1d7c21e33cc715 Subproject commit 06b74a0f23767c8345ed146657120aba812f6764

@ -1 +1 @@
Subproject commit 409bda3a003b18c4736ef168595f20118f4d0038 Subproject commit b29e2214cc959b6b6c841497b7881df369331561

View file

@ -2955,7 +2955,6 @@ RecordVal* RecordVal::CoerceTo(const RecordType* t, Val* aggr) const
Expr* rhs = new ConstExpr(Lookup(i)->Ref()); Expr* rhs = new ConstExpr(Lookup(i)->Ref());
Expr* e = new RecordCoerceExpr(rhs, ar_t->FieldType(t_i)->AsRecordType()); Expr* e = new RecordCoerceExpr(rhs, ar_t->FieldType(t_i)->AsRecordType());
ar->Assign(t_i, e->Eval(0)); ar->Assign(t_i, e->Eval(0));
break;
} }
ar->Assign(t_i, Lookup(i)->Ref()); ar->Assign(t_i, Lookup(i)->Ref());

View file

@ -0,0 +1,3 @@
{
[Wget/1.9+cvs-stable (Red Hat modified)] = [name=Wget, version=[major=1, minor=9, addl=+cvs], host=0.0.0.0, ts=0.0]
}

View file

@ -68,6 +68,8 @@
# t id.orig_h id.orig_p id.resp_h id.resp_p # t id.orig_h id.orig_p id.resp_h id.resp_p
1299499205.0 10.0.0.1 20 10.0.0.2 1033 1299499205.0 10.0.0.1 20 10.0.0.2 1033
1299502795.0 10.0.0.2 20 10.0.0.3 9 1299502795.0 10.0.0.2 20 10.0.0.3 9
> test.log
# t id.orig_h id.orig_p id.resp_h id.resp_p
> test2-11-03-06_19.00.05.log > test2-11-03-06_19.00.05.log
# t id.orig_h id.orig_p id.resp_h id.resp_p # t id.orig_h id.orig_p id.resp_h id.resp_p
1299466805.0 10.0.0.1 20 10.0.0.2 1024 1299466805.0 10.0.0.1 20 10.0.0.2 1024
@ -130,5 +132,3 @@
1299502795.0 10.0.0.2 20 10.0.0.3 9 1299502795.0 10.0.0.2 20 10.0.0.3 9
> test2.log > test2.log
# t id.orig_h id.orig_p id.resp_h id.resp_p # t id.orig_h id.orig_p id.resp_h id.resp_p
> test.log
# t id.orig_h id.orig_p id.resp_h id.resp_p

View file

@ -0,0 +1,25 @@
# @TEST-EXEC: bro %INPUT >output 2>&1
# @TEST-EXEC: btest-diff output
type Version: record {
major: count &optional; ##< Major version number
minor: count &optional; ##< Minor version number
addl: string &optional; ##< Additional version string (e.g. "beta42")
} &log;
type Info: record {
name: string;
version: Version;
host: addr;
ts: time;
};
# Important thing to note here is that $minor2 is not include in the $version field.
global matched_software: table[string] of Info = {
["Wget/1.9+cvs-stable (Red Hat modified)"] =
[$name="Wget", $version=[$major=1,$minor=9,$addl="+cvs"], $host=0.0.0.0, $ts=network_time()],
};
print matched_software;