[pve-devel] [PATCH 1/2] HTTPServer.pm: accept ip6 connections
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri May 8 12:36:28 CEST 2015
---
PVE/HTTPServer.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/HTTPServer.pm b/PVE/HTTPServer.pm
index 6395bdd..b991fe9 100755
--- a/PVE/HTTPServer.pm
+++ b/PVE/HTTPServer.pm
@@ -1504,8 +1504,8 @@ sub accept_connections {
}
if (my $sin = getpeername($clientfh)) {
- my ($pport, $phost) = Socket::unpack_sockaddr_in($sin);
- ($reqstate->{peer_port}, $reqstate->{peer_host}) = ($pport, Socket::inet_ntoa($phost));
+ my ($pfamily, $pport, $phost) = PVE::Tools::unpack_sockaddr_in46($sin);
+ ($reqstate->{peer_port}, $reqstate->{peer_host}) = ($pport, Socket::inet_ntop($pfamily, $phost));
}
if (!$self->{trusted_env} && !$self->check_host_access($reqstate->{peer_host})) {
--
2.1.4
More information about the pve-devel
mailing list