Match all IPv6
dustinlacewell opened this issue · 3 comments
How to match all IPv6 addresses? *::*
isn't working.
Just like how a::b
is an alias for a:0:0:0:0:0:0:b
, you're basically doing *:0:0:0:0:0:0:*
. Either use *:*:*:*:*:*:*:*
if you really really need the IPv6 class, otherwise you can just use ::/0
(for an IPSubnetwork) or ::/::
(for an IPMask) to match every IPv6.
I'm curious, why do you need a match that matches every IPv6?
@SchoofsKelvin I'm writing a DNS pool manager, and one of the possibilities is that a pool captures every available IPv6 host. So needed to know what the pattern for that was.
Thank you!
I'm actually working on some new features involving access lists and such, e.g. whitelist, something like iptables, ... so hearing about a similar use case is quite nice. although with also having some other projects to work on, it'll still take a little while.
I did think about adding *
as a complete wildcard pattern, but the problem there is that I don't support IPv4-and-IPv6-combined. E.g. should getAmount()
return 2**32
or 2**128
? Should convertToMasks()
convert it to an IPv4 or an IPv6 mask? Etc. It can make sense for access lists, though, where it internally just adds/removes both 0.0.0.0/0
and ::/0
.