[Bro] bad record initializer (between Bro 2.3 and 2.4)

Mike Dopheide dopheide at gmail.com
Sun Nov 13 13:54:45 PST 2016


I've isolated the problem to using an 'int' in a record type as seen
below.  According to try.bro.org the it started to fail between versions
2.3 and 2.4.  If you change the boothnum to a string and put quotes around
it, everything is fine.

Was there a syntax change that requires something around the int when it's
initialized?

-Dop


@load base/frameworks/input
@load base/frameworks/notice

# add some stuff to generate notices from our test traffic:
@load misc/scan
@load misc/detect-traceroute
@load protocols/ssh/detect-bruteforcing

module Conn;

export {

    type vlandata: record {
        booth: string &log &optional;
        boothnum: int &log &optional;
    };

    global vlanlist: table[int] of vlandata = table() &redef;

}

redef vlanlist += {
    [11] = [$booth="darkspace"],
    [18] = [$booth="ASDF",$boothnum=1743]
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20161113/44feecc3/attachment.html 


More information about the Bro mailing list