Deleted Added
full compact
tcp_usrreq.c (132675) tcp_usrreq.c (133720)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
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 * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
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 * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94
30 * $FreeBSD: head/sys/netinet/tcp_usrreq.c 132675 2004-07-26 21:29:56Z jmg $
30 * $FreeBSD: head/sys/netinet/tcp_usrreq.c 133720 2004-08-14 15:32:40Z dwmalone $
31 */
32
33#include "opt_ipsec.h"
34#include "opt_inet.h"
35#include "opt_inet6.h"
31 */
32
33#include "opt_ipsec.h"
34#include "opt_inet.h"
35#include "opt_inet6.h"
36#include "opt_random_ip_id.h"
37#include "opt_tcpdebug.h"
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/malloc.h>
42#include <sys/kernel.h>
43#include <sys/sysctl.h>
44#include <sys/mbuf.h>

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

941 }
942 if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
943 inp->in6p_laddr = *addr6;
944 inp->in6p_faddr = sin6->sin6_addr;
945 inp->inp_fport = sin6->sin6_port;
946 /* update flowinfo - draft-itojun-ipv6-flowlabel-api-00 */
947 inp->in6p_flowinfo &= ~IPV6_FLOWLABEL_MASK;
948 if (inp->in6p_flags & IN6P_AUTOFLOWLABEL)
36#include "opt_tcpdebug.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/malloc.h>
41#include <sys/kernel.h>
42#include <sys/sysctl.h>
43#include <sys/mbuf.h>

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

940 }
941 if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
942 inp->in6p_laddr = *addr6;
943 inp->in6p_faddr = sin6->sin6_addr;
944 inp->inp_fport = sin6->sin6_port;
945 /* update flowinfo - draft-itojun-ipv6-flowlabel-api-00 */
946 inp->in6p_flowinfo &= ~IPV6_FLOWLABEL_MASK;
947 if (inp->in6p_flags & IN6P_AUTOFLOWLABEL)
949 inp->in6p_flowinfo |=
950#ifdef RANDOM_IP_ID
948 inp->in6p_flowinfo |=
951 (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK);
949 (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK);
952#else
953 (htonl(ip6_flow_seq++) & IPV6_FLOWLABEL_MASK);
954#endif
955 in_pcbrehash(inp);
956
957 /* Compute window scaling to request. */
958 while (tp->request_r_scale < TCP_MAX_WINSHIFT &&
959 (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat)
960 tp->request_r_scale++;
961
962 soisconnecting(so);

--- 309 unchanged lines hidden ---
950 in_pcbrehash(inp);
951
952 /* Compute window scaling to request. */
953 while (tp->request_r_scale < TCP_MAX_WINSHIFT &&
954 (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat)
955 tp->request_r_scale++;
956
957 soisconnecting(so);

--- 309 unchanged lines hidden ---