[sr-dev] git:3.3: core: try to detect ipv6 addresses only when USE_IPV6 is used