Closed jonathh21 closed 6 years ago
Oh, I have not ever consideration to IPv4 Mapped Address!
Give me a couple of days to solve this problem.
Thanks for your report. 👍
Thank you. I am pretty new to the world of ipv6 and assumed we might as well stored the white listed addresses as ipv6. As you see it was using map from that we found them!
Thank you so very much. I'll roll this in today and look forward to trying it!
(I hope it's OK that I revive this old issue instead of creating a new one, since the question is also related to mapped addresses.)
@jsakamoto: I've noticed that IPv4 address ranges do not Contains
IPv4 addresses mapped to IPv6. Would it make sense that they do? For example, what would you expect the value of IPAddressRange.Parse("10.0.0.0/24").Contains(new IPAddress(new byte[] { 10, 0, 0, 0 }).MapToIPv6())
to be?
@kimsey0
what would you expect the value of
IPAddressRange.Parse("10.0.0.0/24").Contains(new IPAddress(new byte[] { 10, 0, 0, 0 }).MapToIPv6())
to be?
I think it has to return false
.
Because an "IPv4-mapped IPv6 addresses" is IPv6, not IPv4, even if it contains IPv4 address part.
The responsibility of regularizing IP address family must be owned by developers, I think.
That makes sense. Thank you!
You are welcome :)
I have an IPAdress object containing "10.0.0.203" if i call MapToIpv6() I get "::ffff:10.0.0.203"
If I then try and pass that in to IPAddressRange.Parse i get an exception ""Unknown IP range string."".
Any clues?