earlytalker: add explicit reject_type perm

and replace whitelist with is_immune
This commit is contained in:
Matt Simerson 2012-06-03 21:28:54 -04:00
parent 0ab1b50e13
commit 1e26d1f5ec

View File

@ -99,6 +99,9 @@ sub register {
if ( defined $self->{_args}{'defer-reject'} && ! defined $self->{_args}{reject_type} ) { if ( defined $self->{_args}{'defer-reject'} && ! defined $self->{_args}{reject_type} ) {
$self->{_args}{reject_type} = $self->{_args}{action} == 'denysoft' ? 'temp' : 'perm'; $self->{_args}{reject_type} = $self->{_args}{action} == 'denysoft' ? 'temp' : 'perm';
}; };
if ( ! defined $self->{_args}{reject_type} ) {
$self->{_args}{reject_type} = 'perm';
};
# /end compat # /end compat
if ( $qp->{conn} && $qp->{conn}->isa('Apache2::Connection')) { if ( $qp->{conn} && $qp->{conn}->isa('Apache2::Connection')) {
require APR::Const; require APR::Const;
@ -158,7 +161,7 @@ sub connect_handler {
my $in = new IO::Select; my $in = new IO::Select;
return DECLINED unless $self->{_args}{'check-at'}{CONNECT}; return DECLINED unless $self->{_args}{'check-at'}{CONNECT};
return DECLINED if $self->qp->connection->notes('whitelisthost'); return DECLINED if $self->is_immune();
$in->add(\*STDIN) or return DECLINED; $in->add(\*STDIN) or return DECLINED;
if (! $in->can_read($self->{_args}{'wait'})) { if (! $in->can_read($self->{_args}{'wait'})) {
@ -178,7 +181,7 @@ sub data_handler {
my $in = new IO::Select; my $in = new IO::Select;
return DECLINED unless $self->{_args}{'check-at'}{DATA}; return DECLINED unless $self->{_args}{'check-at'}{DATA};
return DECLINED if $self->qp->connection->notes('whitelisthost'); return DECLINED if $self->is_immune();
$in->add(\*STDIN) or return DECLINED; $in->add(\*STDIN) or return DECLINED;
if ( ! $in->can_read($self->{_args}{'wait'})) { if ( ! $in->can_read($self->{_args}{'wait'})) {