[Bro] A problem during using 'set'

Vern Paxson vern at icir.org
Sun May 13 10:09:52 PDT 2012


> if(vals[index2] == "length"){
>                 local length_vals = split(vals[index2 + 1], /-/);
>                 *local lengths: set[count];*

Contrary to most languages, "local" declarations in Bro persist throughout
the entire function/event handler in which they're declared.  They don't
get discarded once the block they're declared in goes out of scope.
I believe this explains the behavior you're encountering

Arguably this should be changed, but doing so would be a fair amount
of work.

		Vern



More information about the Bro mailing list