tcp_input.c (274421) | tcp_input.c (275329) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 2007-2008,2010 5 * Swinburne University of Technology, Melbourne, Australia. 6 * Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org> 7 * Copyright (c) 2010 The FreeBSD Foundation 8 * Copyright (c) 2010-2011 Juniper Networks, Inc. --- 34 unchanged lines hidden (view full) --- 43 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 44 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 45 * SUCH DAMAGE. 46 * 47 * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 48 */ 49 50#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 * Copyright (c) 2007-2008,2010 5 * Swinburne University of Technology, Melbourne, Australia. 6 * Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org> 7 * Copyright (c) 2010 The FreeBSD Foundation 8 * Copyright (c) 2010-2011 Juniper Networks, Inc. --- 34 unchanged lines hidden (view full) --- 43 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 44 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 45 * SUCH DAMAGE. 46 * 47 * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 48 */ 49 50#include <sys/cdefs.h> |
51__FBSDID("$FreeBSD: head/sys/netinet/tcp_input.c 274421 2014-11-12 09:57:15Z glebius $"); | 51__FBSDID("$FreeBSD: head/sys/netinet/tcp_input.c 275329 2014-11-30 13:24:21Z glebius $"); |
52 53#include "opt_ipfw.h" /* for ipfw_fwd */ 54#include "opt_inet.h" 55#include "opt_inet6.h" 56#include "opt_ipsec.h" 57#include "opt_tcpdebug.h" 58 59#include <sys/param.h> --- 1790 unchanged lines hidden (view full) --- 1850 * Set new socket buffer size. 1851 * Give up when limit is reached. 1852 */ 1853 if (newsize) 1854 if (!sbreserve_locked(&so->so_rcv, 1855 newsize, so, NULL)) 1856 so->so_rcv.sb_flags &= ~SB_AUTOSIZE; 1857 m_adj(m, drop_hdrlen); /* delayed header drop */ | 52 53#include "opt_ipfw.h" /* for ipfw_fwd */ 54#include "opt_inet.h" 55#include "opt_inet6.h" 56#include "opt_ipsec.h" 57#include "opt_tcpdebug.h" 58 59#include <sys/param.h> --- 1790 unchanged lines hidden (view full) --- 1850 * Set new socket buffer size. 1851 * Give up when limit is reached. 1852 */ 1853 if (newsize) 1854 if (!sbreserve_locked(&so->so_rcv, 1855 newsize, so, NULL)) 1856 so->so_rcv.sb_flags &= ~SB_AUTOSIZE; 1857 m_adj(m, drop_hdrlen); /* delayed header drop */ |
1858 sbappendstream_locked(&so->so_rcv, m); | 1858 sbappendstream_locked(&so->so_rcv, m, 0); |
1859 } 1860 /* NB: sorwakeup_locked() does an implicit unlock. */ 1861 sorwakeup_locked(so); 1862 if (DELAY_ACK(tp, tlen)) { 1863 tp->t_flags |= TF_DELACK; 1864 } else { 1865 tp->t_flags |= TF_ACKNOW; 1866 tcp_output(tp); --- 1010 unchanged lines hidden (view full) --- 2877 thflags = th->th_flags & TH_FIN; 2878 TCPSTAT_INC(tcps_rcvpack); 2879 TCPSTAT_ADD(tcps_rcvbyte, tlen); 2880 ND6_HINT(tp); 2881 SOCKBUF_LOCK(&so->so_rcv); 2882 if (so->so_rcv.sb_state & SBS_CANTRCVMORE) 2883 m_freem(m); 2884 else | 1859 } 1860 /* NB: sorwakeup_locked() does an implicit unlock. */ 1861 sorwakeup_locked(so); 1862 if (DELAY_ACK(tp, tlen)) { 1863 tp->t_flags |= TF_DELACK; 1864 } else { 1865 tp->t_flags |= TF_ACKNOW; 1866 tcp_output(tp); --- 1010 unchanged lines hidden (view full) --- 2877 thflags = th->th_flags & TH_FIN; 2878 TCPSTAT_INC(tcps_rcvpack); 2879 TCPSTAT_ADD(tcps_rcvbyte, tlen); 2880 ND6_HINT(tp); 2881 SOCKBUF_LOCK(&so->so_rcv); 2882 if (so->so_rcv.sb_state & SBS_CANTRCVMORE) 2883 m_freem(m); 2884 else |
2885 sbappendstream_locked(&so->so_rcv, m); | 2885 sbappendstream_locked(&so->so_rcv, m, 0); |
2886 /* NB: sorwakeup_locked() does an implicit unlock. */ 2887 sorwakeup_locked(so); 2888 } else { 2889 /* 2890 * XXX: Due to the header drop above "th" is 2891 * theoretically invalid by now. Fortunately 2892 * m_adj() doesn't actually frees any mbufs 2893 * when trimming from the head. --- 787 unchanged lines hidden --- | 2886 /* NB: sorwakeup_locked() does an implicit unlock. */ 2887 sorwakeup_locked(so); 2888 } else { 2889 /* 2890 * XXX: Due to the header drop above "th" is 2891 * theoretically invalid by now. Fortunately 2892 * m_adj() doesn't actually frees any mbufs 2893 * when trimming from the head. --- 787 unchanged lines hidden --- |