[Bro-Dev] [JIRA] (BIT-1367) Type clashing problem when records with default values are used in sets.

Johanna Amann (JIRA) jira at bro-tracker.atlassian.net
Mon Apr 6 13:23:00 PDT 2015


     [ https://bro-tracker.atlassian.net/browse/BIT-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johanna Amann reassigned BIT-1367:
----------------------------------

    Assignee: Johanna Amann

> 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
>            Assignee: 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)


More information about the bro-dev mailing list