Skip to content

Conversation

@blackgnezdo
Copy link
Contributor

This fixes "receives control messages for IPv6" test and more
importantly every other kind of ipv6 socket creation. E.g. this
no longer happens:

*Main> :m +*Network.Test.Common
*Network.Test.Common *Main> addr1:_ <- getAddrInfo Nothing (Just "::1") (Just "5000")
*Network.Test.Common *Main> sock <- socket (addrFamily addr1) (addrSocketType addr1) (addrProtocol addr1)
*** Exception: Network.Socket.setSockOpt: invalid argument (Invalid argument)

This fixes "receives control messages for IPv6" test and more
importantly every other kind of ipv6 socket creation. E.g. this
no longer happens:

*Main> :m +*Network.Test.Common
*Network.Test.Common *Main> addr1:_ <- getAddrInfo Nothing (Just "::1") (Just "5000")
*Network.Test.Common *Main> sock <- socket (addrFamily addr1) (addrSocketType addr1) (addrProtocol addr1)
*** Exception: Network.Socket.setSockOpt: invalid argument (Invalid argument)
@kazu-yamamoto kazu-yamamoto self-requested a review June 22, 2021 07:23
Copy link
Collaborator

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@kazu-yamamoto kazu-yamamoto merged commit c47020e into haskell:master Jun 22, 2021
@kazu-yamamoto
Copy link
Collaborator

Merged. Thank you for your contribution!

Note that you can use openSocket for convenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants