tcp_input.c (178888) | tcp_input.c (181056) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 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 --- 16 unchanged lines hidden (view full) --- 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_input.c 8.12 (Berkeley) 5/24/95 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 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 --- 16 unchanged lines hidden (view full) --- 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_input.c 8.12 (Berkeley) 5/24/95 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/tcp_input.c 178888 2008-05-09 23:03:00Z julian $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/tcp_input.c 181056 2008-07-31 15:10:09Z rpaulo $"); |
34 35#include "opt_ipfw.h" /* for ipfw_fwd */ 36#include "opt_inet.h" 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_mac.h" 40#include "opt_tcpdebug.h" 41 --- 81 unchanged lines hidden (view full) --- 123SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW, 124 &tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)"); 125 126static int tcp_do_rfc3390 = 1; 127SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW, 128 &tcp_do_rfc3390, 0, 129 "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)"); 130 | 34 35#include "opt_ipfw.h" /* for ipfw_fwd */ 36#include "opt_inet.h" 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_mac.h" 40#include "opt_tcpdebug.h" 41 --- 81 unchanged lines hidden (view full) --- 123SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW, 124 &tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)"); 125 126static int tcp_do_rfc3390 = 1; 127SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW, 128 &tcp_do_rfc3390, 0, 129 "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)"); 130 |
131int tcp_do_ecn = 0; 132int tcp_ecn_maxretries = 1; 133SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW, 0, "TCP ECN"); 134SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, enable, CTLFLAG_RW, 135 &tcp_do_ecn, 0, "TCP ECN support"); 136SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, maxretries, CTLFLAG_RW, 137 &tcp_ecn_maxretries, 0, "Max retries before giving up on ECN"); 138 |
|
131static int tcp_insecure_rst = 0; 132SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_RW, 133 &tcp_insecure_rst, 0, 134 "Follow the old (insecure) criteria for accepting RST packets"); 135 136int tcp_do_autorcvbuf = 1; 137SYSCTL_INT(_net_inet_tcp, OID_AUTO, recvbuf_auto, CTLFLAG_RW, 138 &tcp_do_autorcvbuf, 0, "Enable automatic receive buffer sizing"); --- 8 unchanged lines hidden (view full) --- 147 &tcp_autorcvbuf_max, 0, "Max size of automatic receive buffer"); 148 149struct inpcbhead tcb; 150#define tcb6 tcb /* for KAME src sync over BSD*'s */ 151struct inpcbinfo tcbinfo; 152 153static void tcp_dooptions(struct tcpopt *, u_char *, int, int); 154static void tcp_do_segment(struct mbuf *, struct tcphdr *, | 139static int tcp_insecure_rst = 0; 140SYSCTL_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_RW, 141 &tcp_insecure_rst, 0, 142 "Follow the old (insecure) criteria for accepting RST packets"); 143 144int tcp_do_autorcvbuf = 1; 145SYSCTL_INT(_net_inet_tcp, OID_AUTO, recvbuf_auto, CTLFLAG_RW, 146 &tcp_do_autorcvbuf, 0, "Enable automatic receive buffer sizing"); --- 8 unchanged lines hidden (view full) --- 155 &tcp_autorcvbuf_max, 0, "Max size of automatic receive buffer"); 156 157struct inpcbhead tcb; 158#define tcb6 tcb /* for KAME src sync over BSD*'s */ 159struct inpcbinfo tcbinfo; 160 161static void tcp_dooptions(struct tcpopt *, u_char *, int, int); 162static void tcp_do_segment(struct mbuf *, struct tcphdr *, |
155 struct socket *, struct tcpcb *, int, int); | 163 struct socket *, struct tcpcb *, int, int, uint8_t); |
156static void tcp_dropwithreset(struct mbuf *, struct tcphdr *, 157 struct tcpcb *, int, int); 158static void tcp_pulloutofband(struct socket *, 159 struct tcphdr *, struct mbuf *, int); 160static void tcp_xmit_timer(struct tcpcb *, int); 161static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *); | 164static void tcp_dropwithreset(struct mbuf *, struct tcphdr *, 165 struct tcpcb *, int, int); 166static void tcp_pulloutofband(struct socket *, 167 struct tcphdr *, struct mbuf *, int); 168static void tcp_xmit_timer(struct tcpcb *, int); 169static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *); |
170static void inline 171 tcp_congestion_exp(struct tcpcb *); |
|
162 | 172 |
173static void inline 174tcp_congestion_exp(struct tcpcb *tp) 175{ 176 u_int win; 177 178 win = min(tp->snd_wnd, tp->snd_cwnd) / 179 2 / tp->t_maxseg; 180 if (win < 2) 181 win = 2; 182 tp->snd_ssthresh = win * tp->t_maxseg; 183 ENTER_FASTRECOVERY(tp); 184 tp->snd_recover = tp->snd_max; 185 if (tp->t_flags & TF_ECN_PERMIT) 186 tp->t_flags |= TF_ECN_SND_CWR; 187} 188 |
|
163/* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */ 164#ifdef INET6 165#define ND6_HINT(tp) \ 166do { \ 167 if ((tp) && (tp)->t_inpcb && \ 168 ((tp)->t_inpcb->inp_vflag & INP_IPV6) != 0) \ 169 nd6_nud_hint(NULL, NULL, 0); \ 170} while (0) --- 62 unchanged lines hidden (view full) --- 233 struct tcpcb *tp = NULL; 234 struct socket *so = NULL; 235 u_char *optp = NULL; 236 int optlen = 0; 237 int len, tlen, off; 238 int drop_hdrlen; 239 int thflags; 240 int rstreason = 0; /* For badport_bandlim accounting purposes */ | 189/* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */ 190#ifdef INET6 191#define ND6_HINT(tp) \ 192do { \ 193 if ((tp) && (tp)->t_inpcb && \ 194 ((tp)->t_inpcb->inp_vflag & INP_IPV6) != 0) \ 195 nd6_nud_hint(NULL, NULL, 0); \ 196} while (0) --- 62 unchanged lines hidden (view full) --- 259 struct tcpcb *tp = NULL; 260 struct socket *so = NULL; 261 u_char *optp = NULL; 262 int optlen = 0; 263 int len, tlen, off; 264 int drop_hdrlen; 265 int thflags; 266 int rstreason = 0; /* For badport_bandlim accounting purposes */ |
267 uint8_t iptos; |
|
241#ifdef IPFIREWALL_FORWARD 242 struct m_tag *fwd_tag; 243#endif 244#ifdef INET6 245 struct ip6_hdr *ip6 = NULL; 246 int isipv6; 247#else 248 const void *ip6 = NULL; --- 93 unchanged lines hidden (view full) --- 342 if (th->th_sum) { 343 tcpstat.tcps_rcvbadsum++; 344 goto drop; 345 } 346 /* Re-initialization for later version check */ 347 ip->ip_v = IPVERSION; 348 } 349 | 268#ifdef IPFIREWALL_FORWARD 269 struct m_tag *fwd_tag; 270#endif 271#ifdef INET6 272 struct ip6_hdr *ip6 = NULL; 273 int isipv6; 274#else 275 const void *ip6 = NULL; --- 93 unchanged lines hidden (view full) --- 369 if (th->th_sum) { 370 tcpstat.tcps_rcvbadsum++; 371 goto drop; 372 } 373 /* Re-initialization for later version check */ 374 ip->ip_v = IPVERSION; 375 } 376 |
377#ifdef INET6 378 if (isipv6) 379 iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; 380 else 381#endif 382 iptos = ip->ip_tos; 383 |
|
350 /* 351 * Check that TCP offset makes sense, 352 * pull out TCP options and adjust length. XXX 353 */ 354 off = th->th_off << 2; 355 if (off < sizeof (struct tcphdr) || off > tlen) { 356 tcpstat.tcps_rcvbadoff++; 357 goto drop; --- 280 unchanged lines hidden (view full) --- 638 tp = intotcpcb(inp); 639 KASSERT(tp->t_state == TCPS_SYN_RECEIVED, 640 ("%s: ", __func__)); 641 /* 642 * Process the segment and the data it 643 * contains. tcp_do_segment() consumes 644 * the mbuf chain and unlocks the inpcb. 645 */ | 384 /* 385 * Check that TCP offset makes sense, 386 * pull out TCP options and adjust length. XXX 387 */ 388 off = th->th_off << 2; 389 if (off < sizeof (struct tcphdr) || off > tlen) { 390 tcpstat.tcps_rcvbadoff++; 391 goto drop; --- 280 unchanged lines hidden (view full) --- 672 tp = intotcpcb(inp); 673 KASSERT(tp->t_state == TCPS_SYN_RECEIVED, 674 ("%s: ", __func__)); 675 /* 676 * Process the segment and the data it 677 * contains. tcp_do_segment() consumes 678 * the mbuf chain and unlocks the inpcb. 679 */ |
646 tcp_do_segment(m, th, so, tp, drop_hdrlen, tlen); | 680 tcp_do_segment(m, th, so, tp, drop_hdrlen, tlen, 681 iptos); |
647 INP_INFO_UNLOCK_ASSERT(&tcbinfo); 648 return; 649 } 650 /* 651 * Segment flag validation for new connection attempts: 652 * 653 * Our (SYN|ACK) response was rejected. 654 * Check with syncache and remove entry to prevent --- 183 unchanged lines hidden (view full) --- 838 return; 839 } 840 841 /* 842 * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later 843 * state. tcp_do_segment() always consumes the mbuf chain, unlocks 844 * the inpcb, and unlocks pcbinfo. 845 */ | 682 INP_INFO_UNLOCK_ASSERT(&tcbinfo); 683 return; 684 } 685 /* 686 * Segment flag validation for new connection attempts: 687 * 688 * Our (SYN|ACK) response was rejected. 689 * Check with syncache and remove entry to prevent --- 183 unchanged lines hidden (view full) --- 873 return; 874 } 875 876 /* 877 * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later 878 * state. tcp_do_segment() always consumes the mbuf chain, unlocks 879 * the inpcb, and unlocks pcbinfo. 880 */ |
846 tcp_do_segment(m, th, so, tp, drop_hdrlen, tlen); | 881 tcp_do_segment(m, th, so, tp, drop_hdrlen, tlen, iptos); |
847 INP_INFO_UNLOCK_ASSERT(&tcbinfo); 848 return; 849 850dropwithreset: 851 INP_INFO_WLOCK_ASSERT(&tcbinfo); 852 tcp_dropwithreset(m, th, tp, tlen, rstreason); 853 m = NULL; /* mbuf chain got consumed. */ 854dropunlock: --- 7 unchanged lines hidden (view full) --- 862 free(s, M_TCPLOG); 863 if (m != NULL) 864 m_freem(m); 865 return; 866} 867 868static void 869tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, | 882 INP_INFO_UNLOCK_ASSERT(&tcbinfo); 883 return; 884 885dropwithreset: 886 INP_INFO_WLOCK_ASSERT(&tcbinfo); 887 tcp_dropwithreset(m, th, tp, tlen, rstreason); 888 m = NULL; /* mbuf chain got consumed. */ 889dropunlock: --- 7 unchanged lines hidden (view full) --- 897 free(s, M_TCPLOG); 898 if (m != NULL) 899 m_freem(m); 900 return; 901} 902 903static void 904tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, |
870 struct tcpcb *tp, int drop_hdrlen, int tlen) | 905 struct tcpcb *tp, int drop_hdrlen, int tlen, uint8_t iptos) |
871{ 872 int thflags, acked, ourfinisacked, needoutput = 0; 873 int headlocked = 1; 874 int rstreason, todrop, win; 875 u_long tiwin; 876 struct tcpopt to; 877 878#ifdef TCPDEBUG --- 26 unchanged lines hidden (view full) --- 905 906 /* 907 * Unscale the window into a 32-bit value. 908 * For the SYN_SENT state the scale is zero. 909 */ 910 tiwin = th->th_win << tp->snd_scale; 911 912 /* | 906{ 907 int thflags, acked, ourfinisacked, needoutput = 0; 908 int headlocked = 1; 909 int rstreason, todrop, win; 910 u_long tiwin; 911 struct tcpopt to; 912 913#ifdef TCPDEBUG --- 26 unchanged lines hidden (view full) --- 940 941 /* 942 * Unscale the window into a 32-bit value. 943 * For the SYN_SENT state the scale is zero. 944 */ 945 tiwin = th->th_win << tp->snd_scale; 946 947 /* |
948 * TCP ECN processing. 949 */ 950 if (tp->t_flags & TF_ECN_PERMIT) { 951 switch (iptos & IPTOS_ECN_MASK) { 952 case IPTOS_ECN_CE: 953 tp->t_flags |= TF_ECN_SND_ECE; 954 tcpstat.tcps_ecn_ce++; 955 break; 956 case IPTOS_ECN_ECT0: 957 tcpstat.tcps_ecn_ect0++; 958 break; 959 case IPTOS_ECN_ECT1: 960 tcpstat.tcps_ecn_ect1++; 961 break; 962 } 963 964 if (thflags & TH_CWR) 965 tp->t_flags &= ~TF_ECN_SND_ECE; 966 967 /* 968 * Congestion experienced. 969 * Ignore if we are already trying to recover. 970 */ 971 if ((thflags & TH_ECE) && 972 SEQ_LEQ(th->th_ack, tp->snd_recover)) { 973 tcpstat.tcps_ecn_rcwnd++; 974 tcp_congestion_exp(tp); 975 } 976 } 977 978 /* |
|
913 * Parse options on any incoming segment. 914 */ 915 tcp_dooptions(&to, (u_char *)(th + 1), 916 (th->th_off << 2) - sizeof(struct tcphdr), 917 (thflags & TH_SYN) ? TO_SYN : 0); 918 919 /* 920 * If echoed timestamp is later than the current time, --- 328 unchanged lines hidden (view full) --- 1249 /* 1250 * If the state is SYN_SENT: 1251 * if seg contains an ACK, but not for our SYN, drop the input. 1252 * if seg contains a RST, then drop the connection. 1253 * if seg does not contain SYN, then drop it. 1254 * Otherwise this is an acceptable SYN segment 1255 * initialize tp->rcv_nxt and tp->irs 1256 * if seg contains ack then advance tp->snd_una | 979 * Parse options on any incoming segment. 980 */ 981 tcp_dooptions(&to, (u_char *)(th + 1), 982 (th->th_off << 2) - sizeof(struct tcphdr), 983 (thflags & TH_SYN) ? TO_SYN : 0); 984 985 /* 986 * If echoed timestamp is later than the current time, --- 328 unchanged lines hidden (view full) --- 1315 /* 1316 * If the state is SYN_SENT: 1317 * if seg contains an ACK, but not for our SYN, drop the input. 1318 * if seg contains a RST, then drop the connection. 1319 * if seg does not contain SYN, then drop it. 1320 * Otherwise this is an acceptable SYN segment 1321 * initialize tp->rcv_nxt and tp->irs 1322 * if seg contains ack then advance tp->snd_una |
1323 * if seg contains an ECE and ECN support is enabled, the stream 1324 * is ECN capable. |
|
1257 * if SYN has been acked change to ESTABLISHED else SYN_RCVD state 1258 * arrange for segment to be acked (eventually) 1259 * continue processing rest of data/controls, beginning with URG 1260 */ 1261 case TCPS_SYN_SENT: 1262 if ((thflags & TH_ACK) && 1263 (SEQ_LEQ(th->th_ack, tp->iss) || 1264 SEQ_GT(th->th_ack, tp->snd_max))) { --- 28 unchanged lines hidden (view full) --- 1293 * If there's data, delay ACK; if there's also a FIN 1294 * ACKNOW will be turned on later. 1295 */ 1296 if (DELAY_ACK(tp) && tlen != 0) 1297 tcp_timer_activate(tp, TT_DELACK, 1298 tcp_delacktime); 1299 else 1300 tp->t_flags |= TF_ACKNOW; | 1325 * if SYN has been acked change to ESTABLISHED else SYN_RCVD state 1326 * arrange for segment to be acked (eventually) 1327 * continue processing rest of data/controls, beginning with URG 1328 */ 1329 case TCPS_SYN_SENT: 1330 if ((thflags & TH_ACK) && 1331 (SEQ_LEQ(th->th_ack, tp->iss) || 1332 SEQ_GT(th->th_ack, tp->snd_max))) { --- 28 unchanged lines hidden (view full) --- 1361 * If there's data, delay ACK; if there's also a FIN 1362 * ACKNOW will be turned on later. 1363 */ 1364 if (DELAY_ACK(tp) && tlen != 0) 1365 tcp_timer_activate(tp, TT_DELACK, 1366 tcp_delacktime); 1367 else 1368 tp->t_flags |= TF_ACKNOW; |
1369 1370 if ((thflags & TH_ECE) && tcp_do_ecn) { 1371 tp->t_flags |= TF_ECN_PERMIT; 1372 tcpstat.tcps_ecn_shs++; 1373 } 1374 |
|
1301 /* 1302 * Received <SYN,ACK> in SYN_SENT[*] state. 1303 * Transitions: 1304 * SYN_SENT --> ESTABLISHED 1305 * SYN_SENT* --> FIN_WAIT_1 1306 */ 1307 tp->t_starttime = ticks; 1308 if (tp->t_flags & TF_NEEDFIN) { --- 445 unchanged lines hidden (view full) --- 1754 * and pull our congestion window back to 1755 * the new ssthresh). 1756 * 1757 * Dup acks mean that packets have left the 1758 * network (they're now cached at the receiver) 1759 * so bump cwnd by the amount in the receiver 1760 * to keep a constant cwnd packets in the 1761 * network. | 1375 /* 1376 * Received <SYN,ACK> in SYN_SENT[*] state. 1377 * Transitions: 1378 * SYN_SENT --> ESTABLISHED 1379 * SYN_SENT* --> FIN_WAIT_1 1380 */ 1381 tp->t_starttime = ticks; 1382 if (tp->t_flags & TF_NEEDFIN) { --- 445 unchanged lines hidden (view full) --- 1828 * and pull our congestion window back to 1829 * the new ssthresh). 1830 * 1831 * Dup acks mean that packets have left the 1832 * network (they're now cached at the receiver) 1833 * so bump cwnd by the amount in the receiver 1834 * to keep a constant cwnd packets in the 1835 * network. |
1836 * 1837 * When using TCP ECN, notify the peer that 1838 * we reduced the cwnd. |
|
1762 */ 1763 if (!tcp_timer_active(tp, TT_REXMT) || 1764 th->th_ack != tp->snd_una) 1765 tp->t_dupacks = 0; 1766 else if (++tp->t_dupacks > tcprexmtthresh || 1767 ((tcp_do_newreno || 1768 (tp->t_flags & TF_SACK_PERMIT)) && 1769 IN_FASTRECOVERY(tp))) { --- 15 unchanged lines hidden (view full) --- 1785 tp->snd_cwnd = tp->snd_ssthresh; 1786 } 1787 } else 1788 tp->snd_cwnd += tp->t_maxseg; 1789 (void) tcp_output(tp); 1790 goto drop; 1791 } else if (tp->t_dupacks == tcprexmtthresh) { 1792 tcp_seq onxt = tp->snd_nxt; | 1839 */ 1840 if (!tcp_timer_active(tp, TT_REXMT) || 1841 th->th_ack != tp->snd_una) 1842 tp->t_dupacks = 0; 1843 else if (++tp->t_dupacks > tcprexmtthresh || 1844 ((tcp_do_newreno || 1845 (tp->t_flags & TF_SACK_PERMIT)) && 1846 IN_FASTRECOVERY(tp))) { --- 15 unchanged lines hidden (view full) --- 1862 tp->snd_cwnd = tp->snd_ssthresh; 1863 } 1864 } else 1865 tp->snd_cwnd += tp->t_maxseg; 1866 (void) tcp_output(tp); 1867 goto drop; 1868 } else if (tp->t_dupacks == tcprexmtthresh) { 1869 tcp_seq onxt = tp->snd_nxt; |
1793 u_int win; | |
1794 1795 /* 1796 * If we're doing sack, check to 1797 * see if we're already in sack 1798 * recovery. If we're not doing sack, 1799 * check to see if we're in newreno 1800 * recovery. 1801 */ 1802 if (tp->t_flags & TF_SACK_PERMIT) { 1803 if (IN_FASTRECOVERY(tp)) { 1804 tp->t_dupacks = 0; 1805 break; 1806 } | 1870 1871 /* 1872 * If we're doing sack, check to 1873 * see if we're already in sack 1874 * recovery. If we're not doing sack, 1875 * check to see if we're in newreno 1876 * recovery. 1877 */ 1878 if (tp->t_flags & TF_SACK_PERMIT) { 1879 if (IN_FASTRECOVERY(tp)) { 1880 tp->t_dupacks = 0; 1881 break; 1882 } |
1807 } else if (tcp_do_newreno) { | 1883 } else if (tcp_do_newreno || 1884 tcp_do_ecn) { |
1808 if (SEQ_LEQ(th->th_ack, 1809 tp->snd_recover)) { 1810 tp->t_dupacks = 0; 1811 break; 1812 } 1813 } | 1885 if (SEQ_LEQ(th->th_ack, 1886 tp->snd_recover)) { 1887 tp->t_dupacks = 0; 1888 break; 1889 } 1890 } |
1814 win = min(tp->snd_wnd, tp->snd_cwnd) / 1815 2 / tp->t_maxseg; 1816 if (win < 2) 1817 win = 2; 1818 tp->snd_ssthresh = win * tp->t_maxseg; 1819 ENTER_FASTRECOVERY(tp); 1820 tp->snd_recover = tp->snd_max; | 1891 tcp_congestion_exp(tp); |
1821 tcp_timer_activate(tp, TT_REXMT, 0); 1822 tp->t_rtttime = 0; 1823 if (tp->t_flags & TF_SACK_PERMIT) { 1824 tcpstat.tcps_sack_recovery_episode++; 1825 tp->sack_newdata = tp->snd_nxt; 1826 tp->snd_cwnd = tp->t_maxseg; 1827 (void) tcp_output(tp); 1828 goto drop; --- 1206 unchanged lines hidden --- | 1892 tcp_timer_activate(tp, TT_REXMT, 0); 1893 tp->t_rtttime = 0; 1894 if (tp->t_flags & TF_SACK_PERMIT) { 1895 tcpstat.tcps_sack_recovery_episode++; 1896 tp->sack_newdata = tp->snd_nxt; 1897 tp->snd_cwnd = tp->t_maxseg; 1898 (void) tcp_output(tp); 1899 goto drop; --- 1206 unchanged lines hidden --- |