Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_timewait.c
| Show All 26 Lines | |||||
| * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
| * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
| * SUCH DAMAGE. | * SUCH DAMAGE. | ||||
| */ | */ | ||||
| #include "opt_inet.h" | #include "opt_inet.h" | ||||
| #include "opt_inet6.h" | #include "opt_inet6.h" | ||||
| #include "opt_ipsec.h" | #include "opt_ipsec.h" | ||||
| #include "opt_kern_tls.h" | |||||
| #include <sys/param.h> | #include <sys/param.h> | ||||
| #include <sys/systm.h> | #include <sys/systm.h> | ||||
| #include <sys/callout.h> | #include <sys/callout.h> | ||||
| #include <sys/kernel.h> | #include <sys/kernel.h> | ||||
| #ifdef KERN_TLS | |||||
| #include <sys/ktls.h> | |||||
| #endif | |||||
| #include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
| #include <sys/malloc.h> | #include <sys/malloc.h> | ||||
| #include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
| #include <sys/priv.h> | #include <sys/priv.h> | ||||
| #include <sys/proc.h> | #include <sys/proc.h> | ||||
| #include <sys/socket.h> | #include <sys/socket.h> | ||||
| #include <sys/socketvar.h> | #include <sys/socketvar.h> | ||||
| #include <sys/syslog.h> | #include <sys/syslog.h> | ||||
| ▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | tcp_twstart(struct tcpcb *tp) | ||||
| NET_EPOCH_ASSERT(); | NET_EPOCH_ASSERT(); | ||||
| INP_WLOCK_ASSERT(inp); | INP_WLOCK_ASSERT(inp); | ||||
| MPASS(!(tp->t_flags & TF_DISCONNECTED)); | MPASS(!(tp->t_flags & TF_DISCONNECTED)); | ||||
| tcp_state_change(tp, TCPS_TIME_WAIT); | tcp_state_change(tp, TCPS_TIME_WAIT); | ||||
| tcp_free_sackholes(tp); | tcp_free_sackholes(tp); | ||||
| soisdisconnected(inp->inp_socket); | soisdisconnected(inp->inp_socket); | ||||
| #ifdef KERN_TLS | |||||
| /* release ktls snd tag now that no more data can be sent */ | |||||
| if (tptosocket(tp)->so_snd.sb_tls_info != NULL) { | |||||
| ktls_release_snd_tag(tptosocket(tp)->so_snd.sb_tls_info); | |||||
| } | |||||
| #endif | |||||
| if (tp->t_flags & TF_ACKNOW) | if (tp->t_flags & TF_ACKNOW) | ||||
| (void) tcp_output(tp); | (void) tcp_output(tp); | ||||
| tcp_timer_activate(tp, TT_2MSL, 2 * tcp_eff_msl(tp)); | tcp_timer_activate(tp, TT_2MSL, 2 * tcp_eff_msl(tp)); | ||||
| INP_WUNLOCK(inp); | INP_WUNLOCK(inp); | ||||
| } | } | ||||
| /* | /* | ||||
| ▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines | |||||