]> git.proxmox.com Git - pve-common.git/commitdiff
Revert "daemon: add compat code for pmgproxy 6.x"
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 11 Jun 2021 15:55:52 +0000 (17:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 15 Jun 2021 08:19:37 +0000 (10:19 +0200)
This reverts commit a3777dce67cf17cafa82deeeedd9e6067eeb2e2e.

With the upcoming release of pmg-api 7.0 we included the changes for
configuring a LISTEN_IP, thus this compatibility code is not needed
anymore.

Quickly tested with current pmg-api master

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/Daemon.pm

index 2095001a1c60592be9831b09523d44b388b0016f..2ab4f35bc94a8a291d12884048d51fbb79161711 100644 (file)
@@ -799,7 +799,7 @@ sub register_status_command {
 # some useful helper
 
 sub create_reusable_socket {
-    my ($self, $port, $host, $family) = @_;
+    my ($self, $port, $host) = @_;
 
     die "no port specifed" if !$port;
 
@@ -818,6 +818,7 @@ sub create_reusable_socket {
 
        $socket->fcntl(Fcntl::F_SETFD(), Fcntl::FD_CLOEXEC);
     } else {
+
        my %sockargs = (
            LocalPort => $port,
            Listen => SOMAXCONN,
@@ -825,16 +826,7 @@ sub create_reusable_socket {
            GetAddrInfoFlags => 0,
            ReuseAddr => 1,
        );
-
-       # FIXME: drop this if clause and the $family parameter with 7.0:
-       # compat code for pmgproxy
-       if (defined($family)) {
-           $socket = IO::Socket::IP->new(
-               Family => $family,
-               LocalHost => $host,
-               %sockargs) ||
-               die "unable to create socket - $@\n";
-       } elsif (defined($host)) {
+       if (defined($host)) {
            $socket = IO::Socket::IP->new( LocalHost => $host, %sockargs) ||
                die "unable to create socket - $@\n";
        } else {