|
Lines 134-139
Link Here
|
| 134 |
SYSCTL_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, |
134 |
SYSCTL_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, |
| 135 |
&tcbinfo.ipi_count, 0, "Number of active PCBs"); |
135 |
&tcbinfo.ipi_count, 0, "Number of active PCBs"); |
| 136 |
|
136 |
|
|
|
137 |
/* |
| 138 |
* Treat ICMP administratively prohibited like a TCP RST |
| 139 |
* as required by rfc1122 section 3.2.2.1 |
| 140 |
*/ |
| 141 |
|
| 142 |
static int icmp_admin_prohib_like_rst = 0; |
| 143 |
SYSCTL_INT(_net_inet_tcp, OID_AUTO, icmp_admin_prohib_like_rst, CTLFLAG_RW, |
| 144 |
&icmp_admin_prohib_like_rst, 0, "Treat ICMP administratively prohibited messages like TCP RST, rfc1122 section 3.2.2.1"); |
| 145 |
|
| 137 |
static void tcp_cleartaocache __P((void)); |
146 |
static void tcp_cleartaocache __P((void)); |
| 138 |
static void tcp_notify __P((struct inpcb *, int)); |
147 |
static void tcp_notify __P((struct inpcb *, int)); |
| 139 |
|
148 |
|
|
Lines 961-966
Link Here
|
| 961 |
|
970 |
|
| 962 |
if (cmd == PRC_QUENCH) |
971 |
if (cmd == PRC_QUENCH) |
| 963 |
notify = tcp_quench; |
972 |
notify = tcp_quench; |
|
|
973 |
else if ((icmp_admin_prohib_like_rst == 1) && (cmd == PRC_UNREACH_PORT) && (ip)) |
| 974 |
notify = tcp_drop_syn_sent; |
| 964 |
else if (cmd == PRC_MSGSIZE) |
975 |
else if (cmd == PRC_MSGSIZE) |
| 965 |
notify = tcp_mtudisc; |
976 |
notify = tcp_mtudisc; |
| 966 |
else if (!PRC_IS_REDIRECT(cmd) && |
977 |
else if (!PRC_IS_REDIRECT(cmd) && |
|
Lines 1071-1076
Link Here
|
| 1071 |
|
1082 |
|
| 1072 |
if (tp) |
1083 |
if (tp) |
| 1073 |
tp->snd_cwnd = tp->t_maxseg; |
1084 |
tp->snd_cwnd = tp->t_maxseg; |
|
|
1085 |
} |
| 1086 |
|
| 1087 |
/* |
| 1088 |
* When a ICMP unreachable is recieved, drop the |
| 1089 |
* TCP connection, but only if in SYN_SENT |
| 1090 |
*/ |
| 1091 |
void |
| 1092 |
tcp_drop_syn_sent(inp, errno) |
| 1093 |
struct inpcb *inp; |
| 1094 |
int errno; |
| 1095 |
{ |
| 1096 |
struct tcpcb *tp = intotcpcb(inp); |
| 1097 |
if((tp) && (tp->t_state == TCPS_SYN_SENT)) |
| 1098 |
tcp_drop(tp, errno); |
| 1074 |
} |
1099 |
} |
| 1075 |
|
1100 |
|
| 1076 |
/* |
1101 |
/* |