Deleted Added
full compact
sctp_pcb.c (235360) sctp_pcb.c (235416)
1/*-
2 * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved.
3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved.
4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *

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

28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/* $KAME: sctp_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $ */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved.
3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved.
4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 *

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

28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/* $KAME: sctp_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $ */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 235360 2012-05-12 20:11:35Z tuexen $");
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 235416 2012-05-13 19:32:49Z tuexen $");
37
38#include <netinet/sctp_os.h>
39#include <sys/proc.h>
40#include <netinet/sctp_var.h>
41#include <netinet/sctp_sysctl.h>
42#include <netinet/sctp_pcb.h>
43#include <netinet/sctputil.h>
44#include <netinet/sctp.h>

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

4985 outs = &asoc->strmout[i];
4986 /* now clean up any chunks here */
4987 TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) {
4988 TAILQ_REMOVE(&outs->outqueue, sp, next);
4989 if (sp->data) {
4990 if (so) {
4991 /* Still an open socket - report */
4992 sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb,
37
38#include <netinet/sctp_os.h>
39#include <sys/proc.h>
40#include <netinet/sctp_var.h>
41#include <netinet/sctp_sysctl.h>
42#include <netinet/sctp_pcb.h>
43#include <netinet/sctputil.h>
44#include <netinet/sctp.h>

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

4985 outs = &asoc->strmout[i];
4986 /* now clean up any chunks here */
4987 TAILQ_FOREACH_SAFE(sp, &outs->outqueue, next, nsp) {
4988 TAILQ_REMOVE(&outs->outqueue, sp, next);
4989 if (sp->data) {
4990 if (so) {
4991 /* Still an open socket - report */
4992 sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb,
4993 SCTP_NOTIFY_DATAGRAM_UNSENT,
4994 (void *)sp, SCTP_SO_LOCKED);
4993 0, (void *)sp, SCTP_SO_LOCKED);
4995 }
4996 if (sp->data) {
4997 sctp_m_freem(sp->data);
4998 sp->data = NULL;
4999 sp->tail_mbuf = NULL;
5000 }
5001 }
5002 if (sp->net) {

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

5046 /* sa_ignore FREED_MEMORY */
5047 }
5048 /* pending send queue SHOULD be empty */
5049 TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) {
5050 TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next);
5051 if (chk->data) {
5052 if (so) {
5053 /* Still a socket? */
4994 }
4995 if (sp->data) {
4996 sctp_m_freem(sp->data);
4997 sp->data = NULL;
4998 sp->tail_mbuf = NULL;
4999 }
5000 }
5001 if (sp->net) {

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

5045 /* sa_ignore FREED_MEMORY */
5046 }
5047 /* pending send queue SHOULD be empty */
5048 TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) {
5049 TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next);
5050 if (chk->data) {
5051 if (so) {
5052 /* Still a socket? */
5054 sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb,
5055 SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_LOCKED);
5053 sctp_ulp_notify(SCTP_NOTIFY_UNSENT_DG_FAIL, stcb,
5054 0, chk, SCTP_SO_LOCKED);
5056 }
5057 if (chk->data) {
5058 sctp_m_freem(chk->data);
5059 chk->data = NULL;
5060 }
5061 }
5062 if (chk->holds_key_ref)
5063 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);

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

5070 /* sa_ignore FREED_MEMORY */
5071 }
5072 /* sent queue SHOULD be empty */
5073 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) {
5074 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
5075 if (chk->data) {
5076 if (so) {
5077 /* Still a socket? */
5055 }
5056 if (chk->data) {
5057 sctp_m_freem(chk->data);
5058 chk->data = NULL;
5059 }
5060 }
5061 if (chk->holds_key_ref)
5062 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);

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

5069 /* sa_ignore FREED_MEMORY */
5070 }
5071 /* sent queue SHOULD be empty */
5072 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) {
5073 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
5074 if (chk->data) {
5075 if (so) {
5076 /* Still a socket? */
5078 sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb,
5079 SCTP_NOTIFY_DATAGRAM_SENT, chk, SCTP_SO_LOCKED);
5077 sctp_ulp_notify(SCTP_NOTIFY_SENT_DG_FAIL, stcb,
5078 0, chk, SCTP_SO_LOCKED);
5080 }
5081 if (chk->data) {
5082 sctp_m_freem(chk->data);
5083 chk->data = NULL;
5084 }
5085 }
5086 if (chk->holds_key_ref)
5087 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);

--- 2025 unchanged lines hidden ---
5079 }
5080 if (chk->data) {
5081 sctp_m_freem(chk->data);
5082 chk->data = NULL;
5083 }
5084 }
5085 if (chk->holds_key_ref)
5086 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);

--- 2025 unchanged lines hidden ---