You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "derkuci (via GitHub)" <gi...@apache.org> on 2023/03/16 23:21:35 UTC

[GitHub] [thrift] derkuci opened a new pull request, #2769: py TSocket: Only disable socket.IPV6_V6ONLY when the family is AF_INET6

derkuci opened a new pull request, #2769:
URL: https://github.com/apache/thrift/pull/2769

   The changes introduced in 916ae8b8134630f49d32e47c3f0f3218f855a24c causes OSError when the socket is of IPv4 family.  This can be verified by the code snippet below (at least on RHEL 8 and RHEL 9 with Python 3.9):
   ```python
   import socket
   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
   s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
   ```
   This will raise an exception `OSError: [Errno 92] Protocol not available`.
   
   My fix is pretty simply: only set that IPv6 option when the socket family is IPv6.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [thrift] derkuci closed pull request #2769: py TSocket: Only disable socket.IPV6_V6ONLY when the family is AF_INET6

Posted by "derkuci (via GitHub)" <gi...@apache.org>.
derkuci closed pull request #2769: py TSocket: Only disable socket.IPV6_V6ONLY when the family is AF_INET6
URL: https://github.com/apache/thrift/pull/2769


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org