-
Notifications
You must be signed in to change notification settings - Fork 209
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
IPv6 CIDR contains() returns true when it should return false #89
Comments
+1 Looks to me like the mask always assumes v4, any mask value over 32 will produce a subnet with
The tests for the What we can do with v6 is
Would be nice if |
FWIW, I've found that https://www.npmjs.com/package/subnet-check seems to work for both ipv4 and ipv6 for my purposes. |
That looks like a fork of my package https://www.npmjs.com/package/is-in-subnet — yes, I wrote that specifically for this use case. I’m glad it works for you! |
Here’s an example:
This seems obvious so, probably I’m using the library incorrectly, but I can’t see how to fix it.
The text was updated successfully, but these errors were encountered: