mirror of
git://git.proxmox.com/git/pve-http-server.git
synced 2025-08-03 20:21:56 +03:00
add debug log for problems during accept
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
ebcaaf4606
commit
1e1692429a
@ -1544,6 +1544,7 @@ sub check_host_access {
|
|||||||
foreach my $t (@{$self->{allow_from}}) {
|
foreach my $t (@{$self->{allow_from}}) {
|
||||||
if ($t->overlaps($cip)) {
|
if ($t->overlaps($cip)) {
|
||||||
$match_allow = 1;
|
$match_allow = 1;
|
||||||
|
$self->dprint("client IP allowed: ". $t->prefix());
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1552,6 +1553,7 @@ sub check_host_access {
|
|||||||
if ($self->{deny_from}) {
|
if ($self->{deny_from}) {
|
||||||
foreach my $t (@{$self->{deny_from}}) {
|
foreach my $t (@{$self->{deny_from}}) {
|
||||||
if ($t->overlaps($cip)) {
|
if ($t->overlaps($cip)) {
|
||||||
|
$self->dprint("client IP denied: ". $t->prefix());
|
||||||
$match_deny = 1;
|
$match_deny = 1;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
@ -1585,6 +1587,7 @@ sub accept_connections {
|
|||||||
my ($pfamily, $pport, $phost) = PVE::Tools::unpack_sockaddr_in46($sin);
|
my ($pfamily, $pport, $phost) = PVE::Tools::unpack_sockaddr_in46($sin);
|
||||||
($reqstate->{peer_port}, $reqstate->{peer_host}) = ($pport, Socket::inet_ntop($pfamily, $phost));
|
($reqstate->{peer_port}, $reqstate->{peer_host}) = ($pport, Socket::inet_ntop($pfamily, $phost));
|
||||||
} else {
|
} else {
|
||||||
|
$self->dprint("getpeername failed: $!");
|
||||||
close($clientfh);
|
close($clientfh);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
@ -1634,6 +1637,7 @@ sub accept_connections {
|
|||||||
|
|
||||||
if (my $err = $@) {
|
if (my $err = $@) {
|
||||||
syslog('err', $err);
|
syslog('err', $err);
|
||||||
|
$self->dprint("connection accept error: $err");
|
||||||
close($clientfh);
|
close($clientfh);
|
||||||
if ($handle_creation) {
|
if ($handle_creation) {
|
||||||
if ($self->{conn_count} <= 0) {
|
if ($self->{conn_count} <= 0) {
|
||||||
|
Reference in New Issue
Block a user