sctp_usrreq.c (204096) | sctp_usrreq.c (206137) |
---|---|
1/*- 2 * Copyright (c) 2001-2008, 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. --- 17 unchanged lines hidden (view full) --- 26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 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/* $KAME: sctp_usrreq.c,v 1.48 2005/03/07 23:26:08 itojun Exp $ */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001-2008, 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. --- 17 unchanged lines hidden (view full) --- 26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 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/* $KAME: sctp_usrreq.c,v 1.48 2005/03/07 23:26:08 itojun Exp $ */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 204096 2010-02-19 18:00:38Z tuexen $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 206137 2010-04-03 15:40:14Z tuexen $"); |
35#include <netinet/sctp_os.h> 36#include <sys/proc.h> 37#include <netinet/sctp_pcb.h> 38#include <netinet/sctp_header.h> 39#include <netinet/sctp_var.h> 40#if defined(INET6) 41#endif 42#include <netinet/sctp_sysctl.h> --- 1444 unchanged lines hidden (view full) --- 1487 goto out_now; 1488 } 1489 } 1490 /* FIX ME: do we want to pass in a vrf on the connect call? */ 1491 vrf_id = inp->def_vrf_id; 1492 1493 1494 /* We are GOOD to go */ | 35#include <netinet/sctp_os.h> 36#include <sys/proc.h> 37#include <netinet/sctp_pcb.h> 38#include <netinet/sctp_header.h> 39#include <netinet/sctp_var.h> 40#if defined(INET6) 41#endif 42#include <netinet/sctp_sysctl.h> --- 1444 unchanged lines hidden (view full) --- 1487 goto out_now; 1488 } 1489 } 1490 /* FIX ME: do we want to pass in a vrf on the connect call? */ 1491 vrf_id = inp->def_vrf_id; 1492 1493 1494 /* We are GOOD to go */ |
1495 stcb = sctp_aloc_assoc(inp, sa, 1, &error, 0, vrf_id, | 1495 stcb = sctp_aloc_assoc(inp, sa, &error, 0, vrf_id, |
1496 (struct thread *)p 1497 ); 1498 if (stcb == NULL) { 1499 /* Gak! no memory */ 1500 goto out_now; 1501 } 1502 SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_COOKIE_WAIT); 1503 /* move to second address */ --- 2950 unchanged lines hidden (view full) --- 4454 if (stcb != NULL) { 4455 /* Already have or am bring up an association */ 4456 SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EALREADY); 4457 error = EALREADY; 4458 goto out_now; 4459 } 4460 vrf_id = inp->def_vrf_id; 4461 /* We are GOOD to go */ | 1496 (struct thread *)p 1497 ); 1498 if (stcb == NULL) { 1499 /* Gak! no memory */ 1500 goto out_now; 1501 } 1502 SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_COOKIE_WAIT); 1503 /* move to second address */ --- 2950 unchanged lines hidden (view full) --- 4454 if (stcb != NULL) { 4455 /* Already have or am bring up an association */ 4456 SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EALREADY); 4457 error = EALREADY; 4458 goto out_now; 4459 } 4460 vrf_id = inp->def_vrf_id; 4461 /* We are GOOD to go */ |
4462 stcb = sctp_aloc_assoc(inp, addr, 1, &error, 0, vrf_id, p); | 4462 stcb = sctp_aloc_assoc(inp, addr, &error, 0, vrf_id, p); |
4463 if (stcb == NULL) { 4464 /* Gak! no memory */ 4465 goto out_now; 4466 } 4467 if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) { 4468 stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; 4469 /* Set the connected flag so we can queue data */ 4470 SOCKBUF_LOCK(&so->so_rcv); --- 447 unchanged lines hidden --- | 4463 if (stcb == NULL) { 4464 /* Gak! no memory */ 4465 goto out_now; 4466 } 4467 if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) { 4468 stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; 4469 /* Set the connected flag so we can queue data */ 4470 SOCKBUF_LOCK(&so->so_rcv); --- 447 unchanged lines hidden --- |