[libvirt] [tck PATCH] Fix typo/bug in get_network_ip

Laine Stump posted 1 patch 23 weeks ago
Failed in applying to current master (apply log)
lib/Sys/Virt/TCK.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[libvirt] [tck PATCH] Fix typo/bug in get_network_ip

Posted by Laine Stump 23 weeks ago
Signed-off-by: Laine Stump <laine@laine.org>
---
 lib/Sys/Virt/TCK.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Sys/Virt/TCK.pm b/lib/Sys/Virt/TCK.pm
index 78d3774..67eb5f0 100644
--- a/lib/Sys/Virt/TCK.pm
+++ b/lib/Sys/Virt/TCK.pm
@@ -1259,7 +1259,7 @@ sub get_network_ip {
     if ($net_mask) {
         $ip = NetAddr::IP->new($net_ip, $net_mask);
     } elsif ($net_prefix) {
-        $ip = NetAddr::IP->new("$net_ip/$net_mask");
+        $ip = NetAddr::IP->new("$net_ip/$net_prefix");
     } else {
         $ip = NetAddr::IP->new("$net_ip");
     }
-- 
2.14.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [tck PATCH] Fix typo/bug in get_network_ip

Posted by Daniel P. Berrangé 23 weeks ago
On Fri, Jun 08, 2018 at 11:52:07AM -0400, Laine Stump wrote:
> Signed-off-by: Laine Stump <laine@laine.org>
> ---
>  lib/Sys/Virt/TCK.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/Sys/Virt/TCK.pm b/lib/Sys/Virt/TCK.pm
> index 78d3774..67eb5f0 100644
> --- a/lib/Sys/Virt/TCK.pm
> +++ b/lib/Sys/Virt/TCK.pm
> @@ -1259,7 +1259,7 @@ sub get_network_ip {
>      if ($net_mask) {
>          $ip = NetAddr::IP->new($net_ip, $net_mask);
>      } elsif ($net_prefix) {
> -        $ip = NetAddr::IP->new("$net_ip/$net_mask");
> +        $ip = NetAddr::IP->new("$net_ip/$net_prefix");
>      } else {
>          $ip = NetAddr::IP->new("$net_ip");
>      }

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list