Project

General

Profile

Bug #14612

IPv6 address inconsistency (downcase vs. upcase)

Added by chucke (Tiago Cardoso) about 2 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:86170]

Description

I've noticed that sometimes ip addresses re shown using a-f characters in downcase, other times upcase. Here is a small script to show results:

require "resolv"
require "socket"
puts TCPSocket.getaddress("nghttp2.org") #=> "2400:8902::f03c:91ff:fe69:a454"
puts Resolv.getaddresses("nghttp2.org") #=> ["139.162.123.134", "2400:8902::F03C:91FF:FE69:A454"]

Results might be system-dependent (I'm using Mac OS High Sierra).

This makes compare operations a bit harder.


Files

resolv-ipv6-to_s.patch (1.48 KB) resolv-ipv6-to_s.patch hugopeixoto (Hugo Peixoto), 03/21/2018 02:27 PM
resolv-ipv6-lowercase.patch (1.82 KB) resolv-ipv6-lowercase.patch jeremyevans0 (Jeremy Evans), 06/20/2019 05:55 PM

Also available in: Atom PDF