Rewrite out of scope identifiers and remove IPv6 to correct build.

Include well tested and long contributed C++ version logic as a patch.

(0) -10 -2 +2 +10 +30 +100 +300 tip

mercurial