You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Hosts.UnmarshalJSON function checks if there is a / in the IP Address and adds the CIDR /32 if needed. the YAML equivalent (Hosts.UnmarshalYAML) on the other hand does not.
Expected Behavior
The Hosts.UnmarshalYAML method should add the CIDR notation the the end of the IP if there is none existing.
Steps To Reproduce
Use the YAML config
Add a host (for example myhost) to the hosts object and use the IP 10.0.0.10
You will get an error that the netip.ParsePrefix method failed to parse the IP.
Now you add the CIDR /32 at the end and watch it work.
Is this a support request?
Is there an existing issue for this?
Current Behavior
The
Hosts.UnmarshalJSON
function checks if there is a/
in the IP Address and adds the CIDR /32 if needed. the YAML equivalent (Hosts.UnmarshalYAML
) on the other hand does not.Expected Behavior
The
Hosts.UnmarshalYAML
method should add the CIDR notation the the end of the IP if there is none existing.Steps To Reproduce
myhost
) to the hosts object and use the IP10.0.0.10
netip.ParsePrefix
method failed to parse the IP.Environment
Runtime environment
Anything else?
The mentioned methods can be found in the
policy
package on lines 64 and 93, or via this link.The text was updated successfully, but these errors were encountered: