Make ICMPv6 hard error handling for TCP consistent with the ICMPv4
authortuexen <tuexen@FreeBSD.org>
Fri, 21 Oct 2016 10:32:57 +0000 (10:32 +0000)
committertuexen <tuexen@FreeBSD.org>
Fri, 21 Oct 2016 10:32:57 +0000 (10:32 +0000)
commit219874f57efdc5bd330cd2be247bdc25bbe39495
treeac569afab0efdaabc4b1ef8af3f753598066fdd2
parentc9b2fb9f0100cbecc0aebda18ac779e0ff61bcef
Make ICMPv6 hard error handling for TCP consistent with the ICMPv4
handling. 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.

Reviewed by: gallatin, rrs
MFC after: 1 month
Sponsored by: Netflix
Differential Revision: 7904
sys/netinet/ip_icmp.c
sys/netinet/tcp_subr.c
sys/netinet6/icmp6.c
sys/netinet6/ip6_input.c