client/rhel/rhn-client-tools/src/up2date_client/hardware.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 7c2b37ad9dd2a972e04bb31cbb021047c6572564
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Nov 30 17:21:34 2011 +0100
743259 - take hostname of client instead of server
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
index f2e68d8..d85d5d0 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware.py
@@ -428,11 +428,12 @@ def findHostByRoute():
try:
s.settimeout(5)
s.connect((server, port))
+ intf_tmp = s.getsockname()[0]
if family == AF_INET:
- intf = s.getsockname()[0]
+ intf = intf_tmp
else:
- intf6 = s.getsockname()[0]
- hostname = socket.getfqdn(server)
+ intf6 = intf_tmp
+ hostname = socket.getfqdn(intf_tmp)
except socket.error:
s.close()
continue