This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients SilentGhost, martin.panter, nascheme
Date 2016-07-17.23:52:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The Windows problem, error 10022 = WSAEINVAL from getsockname(), seems to be documented at <>: “The socket has not been bound”.

Regarding the SCTP problem, raising an error seems like an OS bug to  me. However, according to POSIX <>, we cannot rely on getsockname() indicating any particular address family if the socket is unbound.

So on some platforms, it seems like it will only work with bound sockets, or you have to use less-standard options like SO_PROTOCOL_INFO or SO_DOMAIN. Although SO_DOMAIN won’t help on Free BSD. The simplest solution may be to document and test that it only works with bound sockets.

For the problem with SO_PROTOCOL being unsupported at run-time, I think it would be better to anticipate EINVAL now, rather than wait for someone to complain. But it is not a big deal.
Date User Action Args
2016-07-17 23:52:53martin.pantersetrecipients: + martin.panter, nascheme, SilentGhost
2016-07-17 23:52:53martin.pantersetmessageid: <>
2016-07-17 23:52:53martin.panterlinkissue27377 messages
2016-07-17 23:52:53martin.pantercreate