[Bro-Dev] consistency checking for attributes

Vern Paxson vern at corelight.com
Mon Oct 29 13:42:07 PDT 2018


> I'm thinking of implementing this as an internal table of meta-attributes,
> i.e., each attribute type, like ATTR_OPTIONAL, will have its own attributes
> ...

Looking into this further, it appears that the basic issue is that while
Attributes::CheckAttr already tries to make sure that a given attribute
makes sense, its checking is deficient.  Some of this might be because it
lacks information about whether the attribute is appearing in the context
of a type or a variable.  Also, Attributes::AddAttr already checks for
repeated attributes, but it just silently replaces them.  This works okay for
a situation where a type is being refined by introducing updated attributes,
but doesn't make sense when all of the attributes are presented together
(like in my example); again, it needs more context to figure that out.

		Vern


More information about the bro-dev mailing list