Catch and report aborted connects.

This commit is contained in:
Daniel Nichter
2013-01-28 14:12:48 -07:00
parent 15b1c43874
commit 9e7248861d
6 changed files with 198 additions and 1 deletions

View File

@@ -340,6 +340,18 @@ sub parse_event {
if ( $packet->{data_len} == 0 ) {
PTDEBUG && _d('TCP control:',
map { uc $_ } grep { $packet->{$_} } qw(syn ack fin rst));
if ( $packet->{'fin'}
&& ($session->{state} || '') eq 'server_handshake' ) {
PTDEBUG && _d('Client aborted connection');
my $event = {
cmd => 'Admin',
arg => 'administrator command: Connect aborted',
ts => $packet->{ts},
};
$event = $self->_make_event($event, $packet, $session);
delete $self->{sessions}->{$session->{client}};
return $event;
}
return;
}