Ensure that:
- Protocol unreachable errors are handled by indicating ECONNREFUSED to the TCP user for both IPv4 and IPv6. These were ignored for IPv6.
- Communication prohibited errors are handled by indicating ECONNREFUSED to the TCP user for both IPv4 and IPv6. These were ignored for IPv6.
- Hop Limited exceeded errors are handled by indicating EHOSTUNREACH to the TCP user for both IPv4 and IPv6. For IPv6 the TCP connected was dropped but errno wasn't set.
This is done by:
- Reporting PRC_UNREACH_PROTOCOL and PRC_UNREACH_PORT for IPv4 and IPv6. For IPv4 PRC_UNREACH_PROTOCOL, was always mapped to PRC_UNREACH_PORT.
- Reporting PRC_UNREACH_ADMIN_PROHIB for IPv6. It was reported as PRC_UNREACH_PROTOCOL.
- Adding the explicit handling of PRC_UNREACH_PROTOCOL.
- Add the correct errnos for PRC_UNREACH_ADMIN_PROHIB and PRC_TIMXCEED_INTRANS for IPv6.