[Bro-Dev] [JIRA] (BIT-1106) Merge topic/bernhard/input-error-fixes

Bernhard Amann (JIRA) jira at bro-tracker.atlassian.net
Thu Dec 5 16:01:45 PST 2013

Bernhard Amann created BIT-1106:

             Summary: Merge topic/bernhard/input-error-fixes
                 Key: BIT-1106
                 URL: https://bro-tracker.atlassian.net/browse/BIT-1106
             Project: Bro Issue Tracker
          Issue Type: Improvement
          Components: Bro
    Affects Versions: git/master
            Reporter: Bernhard Amann

The branch topic/bernhard/input-error-fixes fixes a number of issues of the input framework that all have to do with errors:

Due to architectural constraints, it is very hard for the input framework to handle optional records. For an optional record, either the whole record has to be missing, or all non-optional elements of the record have to be defined. This information is not available to input readers after the records have been unrolled into the threading types.

Behavior so far was to treat optional records like they are non-optional, without warning. The patch changes this behavior to emit an error on stream-creation (during type-checking) and refusing to open the file. I think this is a better idea - the behavior so far was undocumented and unintuitive.

- Second:
For table and event streams, reader backend creation was done very early, before actually checking if all arguments are valid. Initialization is moved after the checks now - this makes a number of delete statements unnecessary. Also - I suspect threads of failed input reader instances were not deleted until shutdown

- Third:
Add a couple more consistency checks, e.g. checking if the destination value of a table has the same type as we need. We did not check everything in all instances, instead we just assigned the things without caring (which works, but is not really desirable).

This change also exposed a few bugs in other testcases where table definitions were wrong (did not respect $want_record)

- Fourth:
Improve error messages and write testcases for all error messages (I think).

This message was sent by Atlassian JIRA

More information about the bro-dev mailing list