Skip to content
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

No validation for non-integer ipv6 prefixes #130

Open
GitNikko opened this issue Mar 13, 2023 · 0 comments
Open

No validation for non-integer ipv6 prefixes #130

GitNikko opened this issue Mar 13, 2023 · 0 comments

Comments

@GitNikko
Copy link

When passing a string value as an ipv6 address prefix I assume it is getting cast to the integer of 0 and being considered a valid prefix. This is also inconsistent behaviour compared to ipv4 addresses.

Thanks

IPAddress.parse('3ffe:505:2::1/junk')
=> #<IPAddress::IPv6:0x00007fef565c36c0 @address="3ffe:0505:0002:0000:0000:0000:0000:0001", @compressed="3ffe:505:2::1", @groups=[16382, 1285, 2, 0, 0, 0, 0, 1], @prefix=0>

IPAddress.parse('192.168.1.0/junk')
ArgumentError: Invalid netmask junk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant