mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Brokerstore<->Tables: attribute conflicts
Makes some attributes conflict with each other. This also needed the test to change. The test is a bit flaky - but I can, for the heck of it, not figure out why. I am punting that for the future after spending a few hours on it.
This commit is contained in:
parent
09119ae69d
commit
b027b69f5d
4 changed files with 74 additions and 41 deletions
23
src/Attr.cc
23
src/Attr.cc
|
@ -458,6 +458,13 @@ void Attributes::CheckAttr(Attr* a)
|
|||
break;
|
||||
|
||||
case ATTR_EXPIRE_READ:
|
||||
{
|
||||
if ( Find(ATTR_BROKER_STORE) )
|
||||
{
|
||||
Error("&broker_store and &read_expire cannot be used simultaneously");
|
||||
}
|
||||
}
|
||||
// fallthrough
|
||||
case ATTR_EXPIRE_WRITE:
|
||||
case ATTR_EXPIRE_CREATE:
|
||||
{
|
||||
|
@ -536,6 +543,11 @@ void Attributes::CheckAttr(Attr* a)
|
|||
|
||||
if ( ! e_ft->CheckArgs(&expected_args) )
|
||||
Error("&expire_func argument type clash");
|
||||
|
||||
if ( Find(ATTR_BROKER_STORE ) )
|
||||
{
|
||||
Error("&broker_store and &expire_func cannot be used simultaneously");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -623,9 +635,16 @@ void Attributes::CheckAttr(Attr* a)
|
|||
{
|
||||
Error("&broker_store only supports one-element set/table indexes");
|
||||
}
|
||||
|
||||
if ( Find(ATTR_EXPIRE_FUNC ) )
|
||||
{
|
||||
Error("&broker_store and &expire_func cannot be used simultaneously");
|
||||
}
|
||||
if ( Find(ATTR_EXPIRE_READ) )
|
||||
{
|
||||
Error("&broker_store and &read_expire cannot be used simultaneously");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case ATTR_TRACKED:
|
||||
// FIXME: Check here for global ID?
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue