add function problem

Vern Paxson vern at ee.lbl.gov
Wed Sep 20 02:27:49 PDT 2000


> could someone tell me why this peace of bro-code makes a segmentation fault?
> 
> -------------------------------------------------
> 
> global sessions : set[conn_id];
> 
> event ftp_request(c:connection, command: string, arg:string)
> {
> 	add sessions[c$id];
> }
> 
> --------------------------------------------------

Ouch, I don't know why that's happening, but I've added it to the
to-fix list.

But the more basic problem is that "add" is not currently supported.
You need to instead use:

	global sessions: table[conn_id] of bool;

	event ftp_request(c:connection, command: string, arg:string)
		{
		sessions[c$id] = T;
		}

- Vern



More information about the Bro mailing list