Skip to content

Forkserver: --max-from-ip/max_conn_ip not working when no specific listening interface is defined #315

@wornet-aer

Description

@wornet-aer

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions