New default parameters should be inherited by event functions

Description

Adding a new default parameter to an event, say to event http_header in analyzers/protocol/http/events.bif, requires all handlers for that event to be changed. Bro already supports inheritance of default parameters for functions of the same type, and it seems desirable to allow scripts to continue to work without requiring an update when an event is extended with an optional parameter.

Environment

None

Activity

Show:
TracyMallory
April 13, 2018, 2:10 AM

I've attached a patch that allows event handlers to be automatically updated as with other functions using transfer_arg_defaults() in Var.cc. I tested it with the minimal set of changed files needed to log http headers using the original case, but that fix should be independent of the http header fix.

Assignee

Unassigned

Reporter

TracyMallory

Labels

External issue ID

None

Components

Affects versions

Priority

Normal