mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 23:19:00 +00:00
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:
parent
b40cbf61a7
commit
b77d155dd3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74937
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user