diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-10-22 14:11:35 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-10-22 14:11:35 +0000 |
commit | 462cfae87d08f8a971ddc0da2fd9ac7e7387a66a (patch) | |
tree | e8253148d0fd6acdf1559daa55cad72eb90d0c34 /sys/netinet/tcp_subr.c | |
parent | b00a9568384c6eff1c091fe2f0e09b7f86371732 (diff) |
Unconditionally enable TCP selective acknowledgements (SACK)
OK deraadt, mpi, visa, job
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 27cab0e05bb..50f9b7872f0 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.165 2017/06/26 09:32:32 mpi Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.166 2017/10/22 14:11:34 mikeb Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -104,9 +104,7 @@ int tcp_rttdflt = TCPTV_SRTTDFLT / PR_SLOWHZ; /* values controllable via sysctl */ int tcp_do_rfc1323 = 1; -#ifdef TCP_SACK int tcp_do_sack = 1; /* RFC 2018 selective ACKs */ -#endif int tcp_ack_on_push = 0; /* set to enable immediate ACK-on-PUSH */ #ifdef TCP_ECN int tcp_do_ecn = 0; /* RFC3168 ECN enabled/disabled? */ @@ -120,15 +118,11 @@ u_int32_t tcp_now = 1; #endif int tcp_reass_limit = NMBCLUSTERS / 8; /* hardlimit for tcpqe_pool */ -#ifdef TCP_SACK int tcp_sackhole_limit = 32*1024; /* hardlimit for sackhl_pool */ -#endif struct pool tcpcb_pool; struct pool tcpqe_pool; -#ifdef TCP_SACK struct pool sackhl_pool; -#endif struct cpumem *tcpcounters; /* tcp statistics */ tcp_seq tcp_iss; @@ -145,11 +139,9 @@ tcp_init(void) pool_init(&tcpqe_pool, sizeof(struct tcpqent), 0, IPL_SOFTNET, 0, "tcpqe", NULL); pool_sethardlimit(&tcpqe_pool, tcp_reass_limit, NULL, 0); -#ifdef TCP_SACK pool_init(&sackhl_pool, sizeof(struct sackhole), 0, IPL_SOFTNET, 0, "sackhl", NULL); pool_sethardlimit(&sackhl_pool, tcp_sackhole_limit, NULL, 0); -#endif /* TCP_SACK */ in_pcbinit(&tcbtable, TCB_INITIAL_HASH_SIZE); tcpcounters = counters_alloc(tcps_ncounters); @@ -439,9 +431,7 @@ tcp_newtcpcb(struct inpcb *inp) TCP_TIMER_INIT(tp, i); timeout_set(&tp->t_reap_to, tcp_reaper, tp); -#ifdef TCP_SACK tp->sack_enable = tcp_do_sack; -#endif tp->t_flags = tcp_do_rfc1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; tp->t_inpcb = inp; /* @@ -515,9 +505,7 @@ tcp_close(struct tcpcb *tp) { struct inpcb *inp = tp->t_inpcb; struct socket *so = inp->inp_socket; -#ifdef TCP_SACK struct sackhole *p, *q; -#endif /* free the reassembly queue, if any */ tcp_freeq(tp); @@ -526,7 +514,6 @@ tcp_close(struct tcpcb *tp) TCP_CLEAR_DELACK(tp); syn_cache_cleanup(tp); -#ifdef TCP_SACK /* Free SACK holes. */ q = p = tp->snd_holes; while (p != 0) { @@ -534,7 +521,7 @@ tcp_close(struct tcpcb *tp) pool_put(&sackhl_pool, p); p = q; } -#endif + m_free(tp->t_template); tp->t_flags |= TF_DEAD; |