[pve-devel] applied: [PATCH common] fix #2303: detect IPs of p2p interfaces

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Jul 29 16:23:41 CEST 2019


to master and stable-5, thanks

On Mon, Jul 29, 2019 at 11:27:16AM +0200, Stefan Reiter wrote:
> "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 at proxmox.com>
> ---
>  src/PVE/Network.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
> index 8dfc9c2..b1564e8 100644
> --- a/src/PVE/Network.pm
> +++ b/src/PVE/Network.pm
> @@ -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;
>  	}
>      };
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 




More information about the pve-devel mailing list