You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently had occasion to run a Trio server on a Linux system that had ipv6.disable=1 in the kernel command line. I don't know why it was configured this way, but some Googling suggests that this is not such a very uncommon configuration. In this configuration, getaddrinfo(None, ...) still returns an IPv6 option, but socket(AF_INET6, ...) fails with [Errno 97] Address family not supported by protocol. This also affects several tests in trio's test suite.
I can work around this by explicitly serving on "0.0.0.0", but it feels like a rough edge. As an alternative, maybe trio could suppress EAFNOSUPPORT errors from IPv6 socket creation in open_tcp_listeners if the IPv4 socket was created OK. Thoughts?
The text was updated successfully, but these errors were encountered:
Closespython-trio#853.
- Some such systems return both address families from `getaddrinfo` but fail with `EAFNOSUPPORT` in `socket`. Allow `open_tcp_listeners()` to ignore `EAFNOSUPPORT` as long as at least one listener is created successfully.
- Fix socket tests to be more careful about not even trying to create an IPv6 socket on systems that don't support IPv6.
I recently had occasion to run a Trio server on a Linux system that had
ipv6.disable=1
in the kernel command line. I don't know why it was configured this way, but some Googling suggests that this is not such a very uncommon configuration. In this configuration,getaddrinfo(None, ...)
still returns an IPv6 option, butsocket(AF_INET6, ...)
fails with[Errno 97] Address family not supported by protocol
. This also affects several tests in trio's test suite.I can work around this by explicitly serving on
"0.0.0.0"
, but it feels like a rough edge. As an alternative, maybe trio could suppressEAFNOSUPPORT
errors from IPv6 socket creation inopen_tcp_listeners
if the IPv4 socket was created OK. Thoughts?The text was updated successfully, but these errors were encountered: