Bug 490422 - Replace use of gethostbyname() with getaddrinfo() in python client lib
Summary: Replace use of gethostbyname() with getaddrinfo() in python client lib
Keywords:
Status: CLOSED DUPLICATE of bug 489470
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: 1.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: 1.3
: ---
Assignee: Rafael H. Schloming
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-16 10:28 UTC by Frantisek Reznicek
Modified: 2015-11-16 00:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-08 18:36:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Frantisek Reznicek 2009-03-16 10:28:11 UTC
Description of problem:

socket.gethostbyname(hostname) does not support IPv6 and should be replaced by 
getaddrinfo():
  http://docs.python.org/library/socket.html#socket.gethostbyname

Occurences:
[freznice@dhcp-lab-200 python]$ grep gethostbyname * */* */*/*
commands/qpid-cluster:        self.dottedQuad = socket.gethostbyname(text)
commands/qpid-cluster:                        ip = socket.gethostbyname(tokens[0])
commands/qpid-stat:        self.dottedQuad = socket.gethostbyname(text)
qmf/console.py:    socket.gethostbyname(self.host)
qmf/console.py:    return socket.gethostbyname(self.host) == socket.gethostbyname(host) and self.port == port
Binary file qmf/console.pyc matches
qpid/managementdata.py:    self.host = socket.gethostbyname (host)

Version-Release number of selected component (if applicable):
python-qpid-0.5.752581-1.el5 and svn tree rev.752581

How reproducible:
100%

Steps to Reproduce:
1. grep gethostbyname * */* */*/*
2. cat $(rpm -ql python-qpid | grep -v ".py[co]") | grep gethostbyname
  
Actual results:
Some socket.gethostbyname() occurrences found.

Expected results:
No socket.gethostbyname() occurrences needed.

Additional info:

Comment 1 Gordon Sim 2009-05-08 18:36:00 UTC

*** This bug has been marked as a duplicate of bug 489470 ***


Note You need to log in before you can comment on or make changes to this bug.