kung-foo/freki

Increase time duration of connection flushing

Closed this issue · 2 comments

Freki flush connection table after every 60 seconds, I am using type conn_handler to handle my ssh traffic, so no ssh session could survive longer than 1 minute. That would be great if user could define this timeout. or you can exclude like:
if md.Added.Before(threshold) && md.Rule.Type != "conn_handler" { delete(t.table, ck) }
my quick fix :)

Good catch. Maybe rather than a conn_handler specific fix, we should implement one or two things:

  • add max_conns var, and not invoke a cleanup until that is reached
  • update the conntable with an LastPacket time.Time and which would allow us to support ssh keep-alive no-ops.

Both are important. I would like to make PR for this :)