mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Merge branch 'fastpath' into topic/bernhard/sqlite
This commit is contained in:
commit
8e960cbee4
4 changed files with 27 additions and 16 deletions
7
CHANGES
7
CHANGES
|
@ -1,4 +1,11 @@
|
||||||
|
|
||||||
|
2.1-58 | 2012-10-08 10:10:09 -0700
|
||||||
|
|
||||||
|
* Fix a problem with non-manager cluster nodes applying
|
||||||
|
Notice::policy. This could, for example, result in duplicate
|
||||||
|
emails being sent if Notice::emailed_types is redef'd in local.bro
|
||||||
|
(or any script that gets loaded on all cluster nodes). (Jon Siwek)
|
||||||
|
|
||||||
2.1-56 | 2012-10-03 16:04:52 -0700
|
2.1-56 | 2012-10-03 16:04:52 -0700
|
||||||
|
|
||||||
* Add general FAQ entry about upgrading Bro. (Jon Siwek)
|
* Add general FAQ entry about upgrading Bro. (Jon Siwek)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.1-56
|
2.1-58
|
||||||
|
|
|
@ -23,7 +23,7 @@ redef Cluster::worker2manager_events += /Notice::cluster_notice/;
|
||||||
@if ( Cluster::local_node_type() != Cluster::MANAGER )
|
@if ( Cluster::local_node_type() != Cluster::MANAGER )
|
||||||
# The notice policy is completely handled by the manager and shouldn't be
|
# The notice policy is completely handled by the manager and shouldn't be
|
||||||
# done by workers or proxies to save time for packet processing.
|
# done by workers or proxies to save time for packet processing.
|
||||||
event bro_init() &priority=-11
|
event bro_init() &priority=11
|
||||||
{
|
{
|
||||||
Notice::policy = table();
|
Notice::policy = table();
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,20 +322,10 @@ bool Manager::CreateStream(Stream* info, RecordVal* description)
|
||||||
Unref(mode);
|
Unref(mode);
|
||||||
|
|
||||||
Val* config = description->LookupWithDefault(rtype->FieldOffset("config"));
|
Val* config = description->LookupWithDefault(rtype->FieldOffset("config"));
|
||||||
|
|
||||||
ReaderFrontend* reader_obj = new ReaderFrontend(*rinfo, reader);
|
|
||||||
assert(reader_obj);
|
|
||||||
|
|
||||||
info->reader = reader_obj;
|
|
||||||
info->type = reader->AsEnumVal(); // ref'd by lookupwithdefault
|
|
||||||
info->name = name;
|
|
||||||
info->config = config->AsTableVal(); // ref'd by LookupWithDefault
|
info->config = config->AsTableVal(); // ref'd by LookupWithDefault
|
||||||
info->info = rinfo;
|
|
||||||
|
|
||||||
Ref(description);
|
|
||||||
info->description = description;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
// create config mapping in ReaderInfo. Has to be done before the construction of reader_obj.
|
||||||
HashKey* k;
|
HashKey* k;
|
||||||
IterCookie* c = info->config->AsTable()->InitForIteration();
|
IterCookie* c = info->config->AsTable()->InitForIteration();
|
||||||
|
|
||||||
|
@ -345,13 +335,27 @@ bool Manager::CreateStream(Stream* info, RecordVal* description)
|
||||||
ListVal* index = info->config->RecoverIndex(k);
|
ListVal* index = info->config->RecoverIndex(k);
|
||||||
string key = index->Index(0)->AsString()->CheckString();
|
string key = index->Index(0)->AsString()->CheckString();
|
||||||
string value = v->Value()->AsString()->CheckString();
|
string value = v->Value()->AsString()->CheckString();
|
||||||
info->info->config.insert(std::make_pair(copy_string(key.c_str()), copy_string(value.c_str())));
|
printf("Inserting %s:%s\n", key.c_str(), value.c_str());
|
||||||
|
rinfo->config.insert(std::make_pair(copy_string(key.c_str()), copy_string(value.c_str())));
|
||||||
Unref(index);
|
Unref(index);
|
||||||
delete k;
|
delete k;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ReaderFrontend* reader_obj = new ReaderFrontend(*rinfo, reader);
|
||||||
|
assert(reader_obj);
|
||||||
|
|
||||||
|
info->reader = reader_obj;
|
||||||
|
info->type = reader->AsEnumVal(); // ref'd by lookupwithdefault
|
||||||
|
info->name = name;
|
||||||
|
info->info = rinfo;
|
||||||
|
|
||||||
|
Ref(description);
|
||||||
|
info->description = description;
|
||||||
|
|
||||||
|
|
||||||
DBG_LOG(DBG_INPUT, "Successfully created new input stream %s",
|
DBG_LOG(DBG_INPUT, "Successfully created new input stream %s",
|
||||||
name.c_str());
|
name.c_str());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue