[ https://bro-tracker.atlassian.net/browse/BIT-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jon Siwek updated BIT-1367: --------------------------- Status: Merge Request (was: Open) > Type clashing problem when records with default values are used in sets. > ------------------------------------------------------------------------ > > Key: BIT-1367 > URL: https://bro-tracker.atlassian.net/browse/BIT-1367 > Project: Bro Issue Tracker > Issue Type: Problem > Components: Bro > Affects Versions: git/master > Reporter: Johanna Amann > Labels: logging > Fix For: 2.4 > > > topic/johanna/sft-port is a branch that contains a slight modification to the > sftp log-rotator, adding the possibility to select the server port with a > default value of 20. > After adding this small change, the Bro type system is no longer able to > figure out that it can coerce the record in cases that previously worked. The > default evocation of the sftp log-rotator using: > {code} > Log::add_filter(Conn::LOG, [$name="test", $path="testconn", > $writer=Log::WRITER_ASCII, > $interv=1hr, $postprocessor=Log::sftp_postprocessor]); > Log::sftp_destinations[Log::WRITER_ASCII,"testconn"] = > set([$user="testuser",$host="testhost",$path="testpath"]); > {code} > or similar leads to > {code} > type clash in assignment (Log::sftp_destinations[Log::WRITER_ASCII, testconn] > = set([$user=testuser, $host=testhost, $path=testpath])) > {code} > Directly specifying the type of the record works, but would break all other > scripts that are using the sftp log rotator currently. > Working example: > {code} > Log::add_filter(Conn::LOG, [$name="test", $path="testconn", > $writer=Log::WRITER_ASCII, > $interv=1hr, $postprocessor=Log::sftp_postprocessor]); > Log::sftp_destinations[Log::WRITER_ASCII,"testconn"] = > set(Log::SFTPDestination($user="testuser",$host="testhost",$path="testpath")); > {code} > Once this is fixed, topic/johanna/sft-port can be merged. -- This message was sent by Atlassian JIRA (v6.4-OD-16-006#64014) _______________________________________________ bro-dev mailing list bro-dev@bro.org http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev