-
-
Notifications
You must be signed in to change notification settings - Fork 210
Fixed hydration of the Network class with IPv6 addresses #339
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
Conversation
@GrahamCampbell opened PR here. Issue when building the network entity for droplets with IPv6. |
7fb3869
to
8d30f7b
Compare
For IPv6 networks the netmask is integer and the CIDR field is assigned with `int` to a field with `string` constraint. The netmask in this case represents the number for allow networks. The IPv6 address `2b03:b0c0:2:d0::102e:d001` should have the CIDR notation `2b03:b0c0:2:d0::102e:d001/64` or `2b03:b0c0:0002:00d0:0000:0000:0000:0000/64`. I'm not 100% sure what the netmask value can be on the api die, is it always int? or can it come as string? that's why the check for int.
Added missing test for |
Refactored the fix to comply with Probably similar |
* Tested multiple solutions, this is the nicest and most minimal one, and probably more correct since we are not manipulating values we iterate on. * This also this resulted some cleanup on the baseline rules file.
Thanks for the PR. :) |
The IPv6 address
2b03:b0c0:2:d0::102e:d001
should have the CIDR notation2b03:b0c0:2:d0::102e:d001/64
,2b03:b0c0:0002:00d0:0000:0000:0000:0000/64
.I'm not 100% sure what the netmask value can be, is it always int? or can it come as string? that's why the check.
I guess this also applies for 4.x versions, it's just that the field not have the constraint there and don't produce this error.