Skip to content

resolve_ipnets(): Canonicalize resolved addresses

The version of JRuby included with puppetserver (as of 7.9.5) does not canonicalize IPv6 addresses returned by Socket.getaddrinfo, and thus returns them without compressing runs of zeros. For example, running resolve_ipnets under puppetserver would return 2001:0db8:0:0:0:0:0:1 if running server-less returned 2001:0db8::1.

Work around the issue by converting resolved addresses to IPAddr objects, then back to strings.

Merge request reports

Loading