1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 |
30 * $FreeBSD: head/sys/netinet/tcp_subr.c 130387 2004-06-12 20:47:32Z rwatson $ |
31 */ 32 33#include "opt_compat.h" 34#include "opt_inet.h" 35#include "opt_inet6.h" 36#include "opt_ipsec.h" 37#include "opt_mac.h" 38#include "opt_tcpdebug.h" --- 1613 unchanged lines hidden (view full) --- 1652 /* For T/TCP client, force ACK now. */ 1653 acknow = 1; 1654 } else { 1655 tw_time = 2 * tcp_msl; 1656 acknow = tp->t_flags & TF_ACKNOW; 1657 } 1658 tcp_discardcb(tp); 1659 so = inp->inp_socket; |
1660 SOCK_LOCK(so); |
1661 so->so_pcb = NULL; 1662 tw->tw_cred = crhold(so->so_cred); 1663 tw->tw_so_options = so->so_options; |
1664 sotryfree(so); 1665 inp->inp_socket = NULL; |
1666 if (acknow) 1667 tcp_twrespond(tw, TH_ACK); |
1668 inp->inp_ppcb = (caddr_t)tw; 1669 inp->inp_vflag |= INP_TIMEWAIT; 1670 tcp_timer_2msl_reset(tw, tw_time); 1671 INP_UNLOCK(inp); 1672} 1673 1674/* 1675 * The appromixate rate of ISN increase of Microsoft TCP stacks; --- 422 unchanged lines hidden --- |