Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server sends responses from different endpoints when different global IPv6 addresses are configured #33

Closed
chrysn opened this issue Mar 18, 2016 · 1 comment

Comments

@chrysn
Copy link
Owner

chrysn commented Mar 18, 2016

When a server is configured with different IPv6 addresses, and a aioCoAP server is bound to :: (which is currently the only way to get both v4 and v6 support in a single context), responses will always originate from the v6 address that is preferred by the kernel for packages to its destination, regardless of the destination address of the request that elicited it.

As source addresses can't be set in DatagramTransport.sendto, this needs dedicated endpoints.

@chrysn
Copy link
Owner Author

chrysn commented Mar 18, 2016

a powerdns article suggests that there is an easier workaround than listening to addresses individually: the IPV6_PKTINFO parameter from rfc 3542, which can be used both with recvmsg and sendmsg, and should be somewhat portable. this might not remove all reasons to do #34, but should at least allow sticking to :: for server socket binding.

@chrysn chrysn closed this as completed in bde8c42 Mar 30, 2016
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

No branches or pull requests

1 participant