IpRange::Wildcard.iter_prefixes() looks like it under-covers IPv6.
Wildcard.contains() matches all IP addresses, but iter_prefixes() currently returns ::/1 for IPv6. For wildcard expansion, I think this should be ::/0, otherwise only half the IPv6 space is covered.
Repro:
let pfxs = IpRange::Wildcard.iter_prefixes().collect::<Vec<_>>();
assert_eq!(pfxs[1], "::/0".parse()?);
I have a tiny fix plus regression test here:
main...immanuwell:fix-iprange-wildcard-ipv6
I could not open a PR because the repo currently limits PRs to collaborators. Would you be open to taking this patch?
Created using Codex
IpRange::Wildcard.iter_prefixes()looks like it under-covers IPv6.Wildcard.contains()matches all IP addresses, butiter_prefixes()currently returns::/1for IPv6. For wildcard expansion, I think this should be::/0, otherwise only half the IPv6 space is covered.Repro:
I have a tiny fix plus regression test here:
main...immanuwell:fix-iprange-wildcard-ipv6
I could not open a PR because the repo currently limits PRs to collaborators. Would you be open to taking this patch?
Created using Codex