Skip to content

network accept returns server port number rather than client in some environments

I have a number of machines running Debian Linux. Most of them are running it in 32-bit mode. I also have a work machine that is an AMD64.

On the AMD64 machine, Network.accept returns the server port number rather than the client port number. This seems to be true with ghc-6.8.3 and ghc-6.10.1, and with network-2.2.0.1 and network-2.2.1.2. It does not seem to happen on my 32-bit machines.

Even when the wrong port number is returned, the handle seems to be perfectly good.

Reproduce by running the attached test code and then telnetting to it.

Trac metadata
Trac field Value
Version 6.10.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries (other)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information