-
Notifications
You must be signed in to change notification settings - Fork 177
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 validation seems to not check zone_id correctly #140
Comments
I don't think this is a netaddr issue, this method is just a wrapper around _socket methods.
And my _socket module work as expected, so that looks like yours is buggy :)
|
I think at least on Linux, valid_ipv6 doesn't support zone_id at all. |
We've now come across the issue and it looks to be a fundamental one. It appears that netaddr is not considering IPv6 with zone_id as IPv6. In our usecase, we configure IPv6 link local addresses for daemons to bind to and communicate with. We're using the ansible netaddr/utils filters to detect and modify IPv6 addresses (which internally make heavy use of netaddr, if I'm correct in reading through the source):
Example playbook: ---
- hosts: localhost
tasks:
- debug:
msg:
- "{{ 'fe80::1%ens18.18'|ansible.utils.ipwrap }} we believe should output [fe80::1%ens18.18]"
- "{{ 'fe80::1%ens18.18'|ansible.utils.ipv6 }} we believe should output true" Is |
These are great questions. I'm entirely sure right now, need to sleep on this. I don't think this library is prepared for IPv6 scope zones. |
Looking at the following:
https://tools.ietf.org/html/rfc4007#page-15
It appears that the zone_id has certain restrictions but netaddr isn't checking those.
Apparently one of the checks is that the zone_id can't be null (which it is in the above).
The text was updated successfully, but these errors were encountered: