]> git.proxmox.com Git - pve-common.git/commit
network: is_ip_in_cidr: avoid warning when versions don't match
authorFabian Ebner <f.ebner@proxmox.com>
Mon, 10 May 2021 12:18:14 +0000 (14:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 17 Jun 2021 13:17:37 +0000 (15:17 +0200)
commitb0e3bcc186939ccbcb739496d0b4e08151e8aff0
tree16bf99d1cd8b23f3bcafba87aa132565aa0fd902
parent123c310474b12a21e85d6d12d255faf3a7d4155b
network: is_ip_in_cidr: avoid warning when versions don't match

is_ip_in_cidr('fd80:1::10', '127.0.0.1/24') would result in
    Use of uninitialized value in numeric eq (==)
as overlaps() returns undef in such a case.

Note that there are (albeit few) existing callers that don't specify $version.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/Network.pm