]> git.proxmox.com Git - pve-cluster.git/commitdiff
mtunnel: allow multiple IPs if the are the same
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Nov 2019 12:50:32 +0000 (13:50 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Nov 2019 12:50:34 +0000 (13:50 +0100)
To allow routed full-mesh, where the same IP is used on multiple
adapters. For the migration IP this is OK, as we just want a single
unique IP, if that one is configured more than once does not bothers
us here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/PVE/CLI/pvecm.pm

index ad39e3f7eb6ec184bbbd4c6a286dc1699bb17dc9..c634c9b7fc46c04592bdd8a70bf5559767f3a617 100755 (executable)
@@ -623,8 +623,8 @@ __PACKAGE__->register_method ({
                die "could not get migration ip: no IP address configured on local " .
                    "node for network '$cidr'\n" if scalar(@$ips) == 0;
 
-               die "could not get migration ip: multiple IP address configured for " .
-                   "network '$cidr'\n" if scalar(@$ips) > 1;
+               die "could not get migration ip: multiple, different, IP address configured for " .
+                   "network '$cidr'\n" if scalar(@$ips) > 1 && grep { @$ips[0] ne $_ } @$ips;
 
                return @$ips[0];
            }