mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-03-11 20:58:41 +03:00
fix #2303: detect IPs of p2p interfaces
"ip address show" prints: inet ADDR peer PEERADDR/32 scope global DEVICE for pointtopoint interfaces. We're not interested in the netmask itself, just make the Regex match. Signed-off-by: Stefan Reiter <s.reiter@proxmox.com> (cherry picked from commit 5c1556cd27c93705eef1d02f2d09e0c245212e67)
This commit is contained in:
parent
1893b0c4e8
commit
204ac43882
@ -592,7 +592,7 @@ sub get_local_ip_from_cidr {
|
||||
my $code = sub {
|
||||
my $line = shift;
|
||||
|
||||
if ($line =~ m!^\s*inet(?:6)?\s+($PVE::Tools::IPRE)/\d+!) {
|
||||
if ($line =~ m!^\s*inet(?:6)?\s+($PVE::Tools::IPRE)(?:/\d+|\s+peer\s+)!) {
|
||||
push @$IPs, $1;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user