Deleted Added
full compact
tcp_subr.c (151254) tcp_subr.c (151967)
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
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 151254 2005-10-12 09:24:18Z philip $
30 * $FreeBSD: head/sys/netinet/tcp_subr.c 151967 2005-11-02 13:46:32Z andre $
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"

--- 402 unchanged lines hidden (view full) ---

441 if (tp != NULL) {
442 if (!(flags & TH_RST)) {
443 win = sbspace(&inp->inp_socket->so_rcv);
444 if (win > (long)TCP_MAXWIN << tp->rcv_scale)
445 win = (long)TCP_MAXWIN << tp->rcv_scale;
446 }
447 }
448 if (m == NULL) {
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"

--- 402 unchanged lines hidden (view full) ---

441 if (tp != NULL) {
442 if (!(flags & TH_RST)) {
443 win = sbspace(&inp->inp_socket->so_rcv);
444 if (win > (long)TCP_MAXWIN << tp->rcv_scale)
445 win = (long)TCP_MAXWIN << tp->rcv_scale;
446 }
447 }
448 if (m == NULL) {
449 m = m_gethdr(M_DONTWAIT, MT_HEADER);
449 m = m_gethdr(M_DONTWAIT, MT_DATA);
450 if (m == NULL)
451 return;
452 tlen = 0;
453 m->m_data += max_linkhdr;
454#ifdef INET6
455 if (isipv6) {
456 bcopy((caddr_t)ip6, mtod(m, caddr_t),
457 sizeof(struct ip6_hdr));

--- 1331 unchanged lines hidden (view full) ---

1789 int error;
1790#ifdef INET6
1791 struct ip6_hdr *ip6 = NULL;
1792 int isipv6 = inp->inp_inc.inc_isipv6;
1793#endif
1794
1795 INP_LOCK_ASSERT(inp);
1796
450 if (m == NULL)
451 return;
452 tlen = 0;
453 m->m_data += max_linkhdr;
454#ifdef INET6
455 if (isipv6) {
456 bcopy((caddr_t)ip6, mtod(m, caddr_t),
457 sizeof(struct ip6_hdr));

--- 1331 unchanged lines hidden (view full) ---

1789 int error;
1790#ifdef INET6
1791 struct ip6_hdr *ip6 = NULL;
1792 int isipv6 = inp->inp_inc.inc_isipv6;
1793#endif
1794
1795 INP_LOCK_ASSERT(inp);
1796
1797 m = m_gethdr(M_DONTWAIT, MT_HEADER);
1797 m = m_gethdr(M_DONTWAIT, MT_DATA);
1798 if (m == NULL)
1799 return (ENOBUFS);
1800 m->m_data += max_linkhdr;
1801
1802#ifdef MAC
1803 mac_create_mbuf_from_inpcb(inp, m);
1804#endif
1805

--- 441 unchanged lines hidden ---
1798 if (m == NULL)
1799 return (ENOBUFS);
1800 m->m_data += max_linkhdr;
1801
1802#ifdef MAC
1803 mac_create_mbuf_from_inpcb(inp, m);
1804#endif
1805

--- 441 unchanged lines hidden ---