
The test net001 from the network package is failing on my RedHat 9 box, so I went investigating. Bear in mind I'm completely ignorant of IPV6. This test invokes Network.listenOn (PortNumber 22222) and gets: socket: unsupported operation (Address family not supported by protocol) This machine has getaddrinfo(), so the IPV6 support is enabled. listenOn does this: proto <- getProtocolNumber "tcp" let hints = defaultHints { addrFlags = [AI_ADDRCONFIG, AI_PASSIVE] , addrProtocol = proto } addrs <- getAddrInfo (Just hints) Nothing (Just serv) Exception.bracketOnError (socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)) ... and addrs is: [AddrInfo {addrFlags = [AI_PASSIVE], addrFamily = AF_INET6, addrSocketType = Stream, addrProtocol = 6, addrAddress = [::]:22222, addrCanonName = Nothing},AddrInfo {addrFlags = [AI_PASSIVE], addrFamily = AF_INET, addrSocketType = Stream, addrProtocol = 6, addrAddress = 0.0.0.0:22222, addrCanonName = Nothing}] So the first address in the list is an IPV6 address, but socket refuses to open the socket because (I assume) IPV6 is not really supported. What should we do in this case? Should listenOn try all the available addresses until it finds one that works? Cheers, Simon

Simon Marlow wrote:
The test net001 from the network package is failing on my RedHat 9 box, so I went investigating. Bear in mind I'm completely ignorant of IPV6. This test invokes
Network.listenOn (PortNumber 22222)
and gets:
socket: unsupported operation (Address family not supported by protocol)
This machine has getaddrinfo(), so the IPV6 support is enabled.
It appears that Red Hat 9's IPv6 support is completely broken. I think the simplest thing to do about this is to make an explicit check for RH9 in the configure script and turn off IPv6 support if we detect it. Red Hat EOLed RH9 years ago, so I don't think investing much effort in it is warranted. Does this seem reasonable?

Bryan O'Sullivan wrote:
Simon Marlow wrote:
The test net001 from the network package is failing on my RedHat 9 box, so I went investigating. Bear in mind I'm completely ignorant of IPV6. This test invokes
Network.listenOn (PortNumber 22222)
and gets:
socket: unsupported operation (Address family not supported by protocol)
This machine has getaddrinfo(), so the IPV6 support is enabled.
It appears that Red Hat 9's IPv6 support is completely broken. I think the simplest thing to do about this is to make an explicit check for RH9 in the configure script and turn off IPv6 support if we detect it. Red Hat EOLed RH9 years ago, so I don't think investing much effort in it is warranted.
Does this seem reasonable?
Obviously it's not worth investing a lot of effort in getting this working. I should really upgrade the OS on this box. My main concern was that there wasn't a real bug lurking. Cheers, Simon

Simon Marlow wrote:
Obviously it's not worth investing a lot of effort in getting this working. I should really upgrade the OS on this box. My main concern was that there wasn't a real bug lurking.
All three network tests run fine on somewhat elderly (but newer than RH9) Debian and on shiny new Fedora, so I think it's not a library bug.
participants (2)
-
Bryan O'Sullivan
-
Simon Marlow