sctp_peeloff.c (166675) | sctp_peeloff.c (167598) |
---|---|
1/*- 2 * Copyright (c) 2001-2007, 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> | 1/*- 2 * Copyright (c) 2001-2007, 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 166675 2007-02-12 23:24:31Z rrs $"); | 35__FBSDID("$FreeBSD: head/sys/netinet/sctp_peeloff.c 167598 2007-03-15 11:27:14Z rrs $"); |
36#include <netinet/sctp_os.h> 37#include <netinet/sctp_pcb.h> 38#include <netinet/sctp.h> 39#include <netinet/sctp_uio.h> 40#include <netinet/sctp_var.h> 41#include <netinet/sctp_peeloff.h> 42#include <netinet/sctputil.h> 43#include <netinet/sctp_auth.h> --- 125 unchanged lines hidden (view full) --- 169 n_inp->sctp_socket = newso; 170 if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) { 171 sctp_feature_off(n_inp, SCTP_PCB_FLAGS_AUTOCLOSE); 172 n_inp->sctp_ep.auto_close_time = 0; 173 sctp_timer_stop(SCTP_TIMER_TYPE_AUTOCLOSE, n_inp, stcb, NULL, 174 SCTP_FROM_SCTP_PEELOFF + SCTP_LOC_1); 175 } 176 /* Turn off any non-blocking semantic. */ | 36#include <netinet/sctp_os.h> 37#include <netinet/sctp_pcb.h> 38#include <netinet/sctp.h> 39#include <netinet/sctp_uio.h> 40#include <netinet/sctp_var.h> 41#include <netinet/sctp_peeloff.h> 42#include <netinet/sctputil.h> 43#include <netinet/sctp_auth.h> --- 125 unchanged lines hidden (view full) --- 169 n_inp->sctp_socket = newso; 170 if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) { 171 sctp_feature_off(n_inp, SCTP_PCB_FLAGS_AUTOCLOSE); 172 n_inp->sctp_ep.auto_close_time = 0; 173 sctp_timer_stop(SCTP_TIMER_TYPE_AUTOCLOSE, n_inp, stcb, NULL, 174 SCTP_FROM_SCTP_PEELOFF + SCTP_LOC_1); 175 } 176 /* Turn off any non-blocking semantic. */ |
177 newso->so_state &= ~SS_NBIO; | 177 SCTP_CLEAR_SO_NBIO(newso); |
178 newso->so_state |= SS_ISCONNECTED; 179 /* We remove it right away */ 180#ifdef SCTP_LOCK_LOGGING 181 sctp_log_lock(inp, (struct sctp_tcb *)NULL, SCTP_LOG_LOCK_SOCK); 182#endif 183 TAILQ_REMOVE(&head->so_comp, newso, so_list); 184 head->so_qlen--; 185 SOCK_UNLOCK(head); --- 16 unchanged lines hidden --- | 178 newso->so_state |= SS_ISCONNECTED; 179 /* We remove it right away */ 180#ifdef SCTP_LOCK_LOGGING 181 sctp_log_lock(inp, (struct sctp_tcb *)NULL, SCTP_LOG_LOCK_SOCK); 182#endif 183 TAILQ_REMOVE(&head->so_comp, newso, so_list); 184 head->so_qlen--; 185 SOCK_UNLOCK(head); --- 16 unchanged lines hidden --- |