Don't re-order the output from getaddrinfo, the sysadmin may have configured this via gai.conf.
Try all IPv4 & IPv6 addresses until one works.
Added IPv6 support to bashrc.
Added IPv6 support to cshrc.
Merge pull request #2163 from ic-hep/ipv6-fixes

[v6r13] Ipv6 fixes