Deleted Added
sdiff udiff text old ( 171943 ) new ( 171990 )
full compact
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

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

27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31
32/* $KAME: sctp_peeloff.c,v 1.13 2005/03/06 16:04:18 itojun Exp $ */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/netinet/sctp_peeloff.c 171943 2007-08-24 00:53:53Z rrs $");
36#include <netinet/sctp_os.h>
37#include <netinet/sctp_pcb.h>
38#include <netinet/sctputil.h>
39#include <netinet/sctp_var.h>
40#include <netinet/sctp_var.h>
41#include <netinet/sctp_sysctl.h>
42#include <netinet/sctp.h>
43#include <netinet/sctp_uio.h>

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

105 }
106 n_inp = (struct sctp_inpcb *)so->so_pcb;
107 n_inp->sctp_flags = (SCTP_PCB_FLAGS_UDPTYPE |
108 SCTP_PCB_FLAGS_CONNECTED |
109 SCTP_PCB_FLAGS_IN_TCPPOOL | /* Turn on Blocking IO */
110 (SCTP_PCB_COPY_FLAGS & inp->sctp_flags));
111 n_inp->sctp_socket = so;
112 n_inp->sctp_features = inp->sctp_features;
113 n_inp->sctp_frag_point = inp->sctp_frag_point;
114 n_inp->partial_delivery_point = inp->partial_delivery_point;
115 n_inp->sctp_context = inp->sctp_context;
116 n_inp->inp_starting_point_for_iterator = NULL;
117
118 /*
119 * Now we must move it from one hash table to another and get the
120 * stcb in the right place.
121 */
122 sctp_move_pcb_and_assoc(inp, n_inp, stcb);
123 atomic_add_int(&stcb->asoc.refcnt, 1);
124 SCTP_TCB_UNLOCK(stcb);
125

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

164 SOCK_LOCK(head);
165 SCTP_INP_WLOCK(inp);
166 SCTP_INP_WLOCK(n_inp);
167 n_inp->sctp_flags = (SCTP_PCB_FLAGS_UDPTYPE |
168 SCTP_PCB_FLAGS_CONNECTED |
169 SCTP_PCB_FLAGS_IN_TCPPOOL | /* Turn on Blocking IO */
170 (SCTP_PCB_COPY_FLAGS & inp->sctp_flags));
171 n_inp->sctp_features = inp->sctp_features;
172 n_inp->sctp_frag_point = inp->sctp_frag_point;
173 n_inp->partial_delivery_point = inp->partial_delivery_point;
174 n_inp->sctp_context = inp->sctp_context;
175 n_inp->inp_starting_point_for_iterator = NULL;
176
177 /* copy in the authentication parameters from the original endpoint */
178 if (n_inp->sctp_ep.local_hmacs)
179 sctp_free_hmaclist(n_inp->sctp_ep.local_hmacs);

--- 47 unchanged lines hidden ---