Message4877

Author amak
Recipients amak, pjdm
Date 2009-07-03.12:33:12
SpamBayes Score 4.5610582e-07
Marked as misclassified No
Message-id <1246624393.65.0.423769368997.issue1391@psf.upfronthosting.co.za>
In-reply-to
Content
OK, this problem is caused by the fact that we're not correctly handling
the AI_PASSIVE flag. According to the man page for getaddrinfo

"""
.... the network address in each socket structure  is  initialized  
according to   the   AI_PASSIVE  flag,  which  is  set  in
hints.ai_flags.  The network address in each socket structure  will  be
left  unspecified  if  AI_PASSIVE  flag is set.  This is used by server
applications, which intend to accept client connections on any  network
address.   The  network  address  will be set to the loopback interface
address if the AI_PASSIVE flag is not set.   This  is  used  by  client
applications,  which  intend to connect to a server running on the same
network host.
"""

Which means that when the AI_PASSIVE flag is set, we should be returning
an address that can be used in a bind call, as cpython does.

I'll be checking in a fix for this fairly soon.
History
Date User Action Args
2009-07-03 12:33:13amaksetmessageid: <1246624393.65.0.423769368997.issue1391@psf.upfronthosting.co.za>
2009-07-03 12:33:13amaksetrecipients: + amak, pjdm
2009-07-03 12:33:13amaklinkissue1391 messages
2009-07-03 12:33:12amakcreate