MFC candidate.

Change code from PRC_UNREACH_ADMIN_PROHIB to PRC_UNREACH_PORT for
ICMP_UNREACH_PROTOCOL and ICMP_UNREACH_PORT

And let TCP treat PRC_UNREACH_PORT like PRC_UNREACH_ADMIN_PROHIB

This should fix the case where port unreachables for udp returned
ENETRESET instead of ECONNREFUSED

Problem found by:	Bill Fenner <fenner@research.att.com>
Reviewed by:		jlemon
This commit is contained in:
Jesper Skriver 2001-03-28 14:13:19 +00:00
parent b40cbf61a7
commit b77d155dd3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74937
3 changed files with 5 additions and 3 deletions

View File

@ -339,7 +339,7 @@ icmp_input(m, off, proto)
*/
case ICMP_UNREACH_PROTOCOL:
case ICMP_UNREACH_PORT:
code = PRC_UNREACH_ADMIN_PROHIB;
code = PRC_UNREACH_PORT;
break;
case ICMP_UNREACH_NET_PROHIB:

View File

@ -987,7 +987,8 @@ tcp_ctlinput(cmd, sa, vip)
if (cmd == PRC_QUENCH)
notify = tcp_quench;
else if (icmp_may_rst && cmd == PRC_UNREACH_ADMIN_PROHIB && ip)
else if (icmp_may_rst && (cmd == PRC_UNREACH_ADMIN_PROHIB ||
cmd == PRC_UNREACH_PORT) && ip)
notify = tcp_drop_syn_sent;
else if (cmd == PRC_MSGSIZE)
notify = tcp_mtudisc;

View File

@ -987,7 +987,8 @@ tcp_ctlinput(cmd, sa, vip)
if (cmd == PRC_QUENCH)
notify = tcp_quench;
else if (icmp_may_rst && cmd == PRC_UNREACH_ADMIN_PROHIB && ip)
else if (icmp_may_rst && (cmd == PRC_UNREACH_ADMIN_PROHIB ||
cmd == PRC_UNREACH_PORT) && ip)
notify = tcp_drop_syn_sent;
else if (cmd == PRC_MSGSIZE)
notify = tcp_mtudisc;