-
Notifications
You must be signed in to change notification settings - Fork 75
Description
Today I discovered a strange behaviour:
qpsmtpd
was not blocking too many connections from the same ip address, even with --limit-connections=60 --max-from-ip=6
specified. The overall maximum connection limit of 60
was correctly respected though. I was having the hosts_allow
plugin enable and didn't need to change much to fix it: I just had to explicitly specify the public ip address of my system instead of leaving --listen-address
empty.
I'm not sure yet, if this is a bug within the forkserver or the plugin. The hosts_allow
plugin recognizes every connection as the first one of the client host, which means the wrong behaviour has to do with the following lines:
Lines 74 to 78 in d3cf60d
my $num_conn = 1; # seed with current value | |
my $raddr = inet_aton($remote); | |
foreach my $rip (@{$args{child_addrs}}) { | |
++$num_conn if (defined $rip && $rip eq $raddr); | |
} |
Maybe $args{child_addrs}
is not correctly filled when having no specific listening interface defined?
Any thougths, hints or tips are appreciated! :-)
Cheers
Andreas