From b06979aac33508a8824f13a08f563c70faeb8def Mon Sep 17 00:00:00 2001 From: Wojciech Malota-Wojcik Date: Fri, 9 Aug 2024 08:04:21 +0200 Subject: [PATCH] Fix forward rule validation --- vm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm.go b/vm.go index 62e88a3..bb615c9 100644 --- a/vm.go +++ b/vm.go @@ -731,7 +731,7 @@ func parseMetadata(domainDoc libvirtxml.Domain) (metadata, error) { return metadata{}, errors.Errorf("invalid forward rule %q", rule) } parts2 := strings.SplitN(parts1[2], "/", 2) - if len(parts1) != 3 { + if len(parts2) != 2 { return metadata{}, errors.Errorf("invalid forward rule %q", rule) }