Fix potential race condition when logging VLAN info to conn.log

Lowered priority of a connection_state_remove event handler to ensure
that the "conn" field is initialized in the connection record before
attempting to add the VLAN tags.
This commit is contained in:
Daniel Thayer 2015-11-05 12:13:52 -06:00
parent 1119ca8792
commit 28f4d45d33

View file

@ -15,7 +15,7 @@ redef record Info += {
# Add the VLAN information to the Conn::Info structure after the connection
# has been removed. This ensures it's only done once, and is done before the
# connection information is written to the log.
event connection_state_remove(c: connection) &priority=5
event connection_state_remove(c: connection)
{
if ( c?$vlan )
c$conn$vlan = c$vlan;