[virt-tools-list] [virt-manager PATCH] sshtunnels: resolve the name if host is specified

Giuseppe Scrivano gscrivan at redhat.com
Wed May 6 12:29:50 UTC 2015


bug introduced with commit a2d453f3e20d103a4767394300c5183fde9a6bb4

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1218958

Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---
 virtManager/sshtunnels.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py
index 53f43be..263a6ed 100644
--- a/virtManager/sshtunnels.py
+++ b/virtManager/sshtunnels.py
@@ -48,6 +48,8 @@ class ConnectionInfo(object):
             self._connhost = "127.0.0.1"
 
     def _is_listen_localhost(self, host=None):
+        if host:
+            host = socket.gethostbyname(host)
         return ipaddr.IPNetwork(host or self.gaddr).is_loopback
 
     def _is_listen_any(self):
-- 
2.1.0




More information about the virt-tools-list mailing list