summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-11-02 22:22:22 +0000
committerandre <andre@FreeBSD.org>2004-11-02 22:22:22 +0000
commitd06f3bef4e5637b17335e5d7d51b5c3d5157cf66 (patch)
treef082b55921c42f223ca230e7961d047b01a25539 /sys/netinet/tcp_usrreq.c
parenta033067901d630caa7ecc38fcf8a0d416a4b6d3d (diff)
downloadFreeBSD-src-d06f3bef4e5637b17335e5d7d51b5c3d5157cf66.zip
FreeBSD-src-d06f3bef4e5637b17335e5d7d51b5c3d5157cf66.tar.gz
Remove RFC1644 T/TCP support from the TCP side of the network stack.
A complete rationale and discussion is given in this message and the resulting discussion: http://docs.freebsd.org/cgi/mid.cgi?4177C8AD.6060706 Note that this commit removes only the functional part of T/TCP from the tcp_* related functions in the kernel. Other features introduced with RFC1644 are left intact (socket layer changes, sendmsg(2) on connection oriented protocols) and are meant to be reused by a simpler and less intrusive reimplemention of the previous T/TCP functionality. Discussed on: -arch
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c73
1 files changed, 4 insertions, 69 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 525b48a..f2a9cad 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -815,14 +815,10 @@ tcp_connect(tp, nam, td)
{
struct inpcb *inp = tp->t_inpcb, *oinp;
struct socket *so = inp->inp_socket;
- struct tcptw *otw;
- struct rmxp_tao tao;
struct in_addr laddr;
u_short lport;
int error;
- bzero(&tao, sizeof(tao));
-
if (inp->inp_lport == 0) {
error = in_pcbbind(inp, (struct sockaddr *)0, td->td_ucred);
if (error)
@@ -840,17 +836,8 @@ tcp_connect(tp, nam, td)
&inp->inp_faddr.s_addr, &inp->inp_fport, &oinp, td->td_ucred);
if (error && oinp == NULL)
return error;
- if (oinp) {
- if (oinp != inp &&
- (oinp->inp_vflag & INP_TIMEWAIT) &&
- (ticks - (otw = intotw(oinp))->t_starttime) < tcp_msl &&
- otw->cc_recv != 0) {
- inp->inp_faddr = oinp->inp_faddr;
- inp->inp_fport = oinp->inp_fport;
- (void) tcp_twclose(otw, 0);
- } else
- return EADDRINUSE;
- }
+ if (oinp)
+ return EADDRINUSE;
inp->inp_laddr = laddr;
in_pcbrehash(inp);
@@ -867,26 +854,6 @@ tcp_connect(tp, nam, td)
tp->t_bw_rtseq = tp->iss;
tcp_sendseqinit(tp);
- /*
- * Generate a CC value for this connection and
- * check whether CC or CCnew should be used.
- */
- if (tcp_do_rfc1644)
- tcp_hc_gettao(&inp->inp_inc, &tao);
-
- tp->cc_send = CC_INC(tcp_ccgen);
- if (tao.tao_ccsent != 0 &&
- CC_GEQ(tp->cc_send, tao.tao_ccsent)) {
- tao.tao_ccsent = tp->cc_send;
- } else {
- tao.tao_ccsent = 0;
- tp->t_flags |= TF_SENDCCNEW;
- }
-
- if (tcp_do_rfc1644)
- tcp_hc_updatetao(&inp->inp_inc, TCP_HC_TAO_CCSENT,
- tao.tao_ccsent, 0);
-
return 0;
}
@@ -899,14 +866,10 @@ tcp6_connect(tp, nam, td)
{
struct inpcb *inp = tp->t_inpcb, *oinp;
struct socket *so = inp->inp_socket;
- struct tcptw *otw;
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam;
struct in6_addr *addr6;
- struct rmxp_tao tao;
int error;
- bzero(&tao, sizeof(tao));
-
if (inp->inp_lport == 0) {
error = in6_pcbbind(inp, (struct sockaddr *)0, td->td_ucred);
if (error)
@@ -927,17 +890,8 @@ tcp6_connect(tp, nam, td)
? addr6
: &inp->in6p_laddr,
inp->inp_lport, 0, NULL);
- if (oinp) {
- if (oinp != inp &&
- (oinp->inp_vflag & INP_TIMEWAIT) &&
- (ticks - (otw = intotw(oinp))->t_starttime) < tcp_msl &&
- otw->cc_recv != 0) {
- inp->inp_faddr = oinp->inp_faddr;
- inp->inp_fport = oinp->inp_fport;
- (void) tcp_twclose(otw, 0);
- } else
- return EADDRINUSE;
- }
+ if (oinp)
+ return EADDRINUSE;
if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
inp->in6p_laddr = *addr6;
inp->in6p_faddr = sin6->sin6_addr;
@@ -962,25 +916,6 @@ tcp6_connect(tp, nam, td)
tp->t_bw_rtseq = tp->iss;
tcp_sendseqinit(tp);
- /*
- * Generate a CC value for this connection and
- * check whether CC or CCnew should be used.
- */
- if (tcp_do_rfc1644)
- tcp_hc_gettao(&inp->inp_inc, &tao);
-
- tp->cc_send = CC_INC(tcp_ccgen);
- if (tao.tao_ccsent != 0 &&
- CC_GEQ(tp->cc_send, tao.tao_ccsent)) {
- tao.tao_ccsent = tp->cc_send;
- } else {
- tao.tao_ccsent = 0;
- tp->t_flags |= TF_SENDCCNEW;
- }
- if (tcp_do_rfc1644)
- tcp_hc_updatetao(&inp->inp_inc, TCP_HC_TAO_CCSENT,
- tao.tao_ccsent, 0);
-
return 0;
}
#endif /* INET6 */
OpenPOWER on IntegriCloud