-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add support for Ipv6 network/binds #113
Conversation
Thanks for submitting the PR, and sorry for the delayed response. I'm curious to hear a bit more about why you need this feature for your simulation needs. |
No problem. We were trying to develop some units tests for Axum-based APIs in a system, that for the most part does only support Ipv6 addressing. Changing the addressing either to Ipv4Addr or to IpAddr would be a lot of work and may result in changes in the systems behavior. In short, the codebase is quite large, so we would like to use the least intrusive method to simulate it, which would be Ipv6 support on sockets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this change. The iterator for Ip is a nice idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
This PR implements a
IpNetwork
configuration option, to choose between a underlying Ipv4 or Ipv6 network.The network parameter are used for:
a) granting addresses either from a
192.168.0.0/16
address space, or fromfe80:::/64
b) binding sockets to associated unspecified addresses
0.0.0.0
/:::
The default configuration stays an Ipv4 network with
192.168.0.0/16
.