Public bug reported: getaddrinfo(3) refuses to resolve IPv6 addresses if hint flag AI_ADDRCONFIG is specified and when there are no IPv6 addresses other than link-local are configured. Unfortunately that happens even with AI_NUMERICHOST. This makes it impossible to use nc6 with IPv6 loopback or link-local addresses on such systems, e.g.
$ nc6 -n fe80::a00:27ff:fefd:3b2a%eth0 12345 nc6: forward host lookup failed for remote endpoint fe80::a00:27ff:fefd:3b2a%eth0: Address family for hostname not supported The code to resolve addresses in network.c does #ifdef HAVE_GETADDRINFO_AI_ADDRCONFIG hints.ai_flags |= AI_ADDRCONFIG; #endif if (ca_is_flag_set(attrs, CA_NUMERIC_MODE)) hints.ai_flags |= AI_NUMERICHOST; this should be perhaps changed to the (untested): if (ca_is_flag_set(attrs, CA_NUMERIC_MODE)) hints.ai_flags |= AI_NUMERICHOST; #ifdef HAVE_GETADDRINFO_AI_ADDRCONFIG else hints.ai_flags |= AI_ADDRCONFIG; #endif so that AI_ADDRCONFIG is not specified when numeric host address is used. ** Affects: nc6 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1534215 Title: link-local IPv6 addresses are rejected To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nc6/+bug/1534215/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs