Changed Ipv4-compatible to Ipv4-mapped addresses #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
This crate states that it supports the use of Ipv4 CIDR notation when defining a range for the IP generator to use. However, during my tests using it I did not find that to be the case. Rather, I got the following error:
Furthermore, the test currently fail in
lib.rsChanges
After doing some debugging within the crate itself, I found that when converting from Ipv4 to Ipv6, Ipv4-compatible Ipv6 addresses were used. This type of address "was defined to assist in the IPv6 transition" and is now deprecated as of RFC 4291. Instead of prepending a
::, in the case of the Ipv4-compatible address,ip()should prepend::fff:(and likewise strip).Conclusion
This fixes the issues I encountered when trying to generate Ipv4 addresses using this crate and restores the tests in
lib.rsto working order.