Deleted Added
full compact
sctputil.c (168859) sctputil.c (168943)
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.

--- 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: sctputil.c,v 1.37 2005/03/07 23:26:09 itojun Exp $ */
32
33#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.

--- 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: sctputil.c,v 1.37 2005/03/07 23:26:09 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 168859 2007-04-19 11:28:43Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 168943 2007-04-22 11:06:27Z rrs $");
35
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_sysctl.h>
41#ifdef INET6
42#include <netinet6/sctp6_var.h>

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

2997 sctp_add_to_readq(stcb->sctp_ep, stcb,
2998 control,
2999 &stcb->sctp_socket->so_rcv, 1);
3000}
3001
3002/* This always must be called with the read-queue LOCKED in the INP */
3003void
3004sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb,
35
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_sysctl.h>
41#ifdef INET6
42#include <netinet6/sctp6_var.h>

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

2997 sctp_add_to_readq(stcb->sctp_ep, stcb,
2998 control,
2999 &stcb->sctp_socket->so_rcv, 1);
3000}
3001
3002/* This always must be called with the read-queue LOCKED in the INP */
3003void
3004sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb,
3005 uint32_t error, int nolock)
3005 uint32_t error, int nolock, uint32_t val)
3006{
3007 struct mbuf *m_notify;
3008 struct sctp_pdapi_event *pdapi;
3009 struct sctp_queued_to_read *control;
3010 struct sockbuf *sb;
3011
3012 if (sctp_is_feature_off(stcb->sctp_ep, SCTP_PCB_FLAGS_PDAPIEVNT))
3013 /* event not enabled */

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

3018 /* no space left */
3019 return;
3020 SCTP_BUF_LEN(m_notify) = 0;
3021 pdapi = mtod(m_notify, struct sctp_pdapi_event *);
3022 pdapi->pdapi_type = SCTP_PARTIAL_DELIVERY_EVENT;
3023 pdapi->pdapi_flags = 0;
3024 pdapi->pdapi_length = sizeof(struct sctp_pdapi_event);
3025 pdapi->pdapi_indication = error;
3006{
3007 struct mbuf *m_notify;
3008 struct sctp_pdapi_event *pdapi;
3009 struct sctp_queued_to_read *control;
3010 struct sockbuf *sb;
3011
3012 if (sctp_is_feature_off(stcb->sctp_ep, SCTP_PCB_FLAGS_PDAPIEVNT))
3013 /* event not enabled */

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

3018 /* no space left */
3019 return;
3020 SCTP_BUF_LEN(m_notify) = 0;
3021 pdapi = mtod(m_notify, struct sctp_pdapi_event *);
3022 pdapi->pdapi_type = SCTP_PARTIAL_DELIVERY_EVENT;
3023 pdapi->pdapi_flags = 0;
3024 pdapi->pdapi_length = sizeof(struct sctp_pdapi_event);
3025 pdapi->pdapi_indication = error;
3026 pdapi->pdapi_stream = (val >> 16);
3027 pdapi->pdapi_seq = (val & 0x0000ffff);
3026 pdapi->pdapi_assoc_id = sctp_get_associd(stcb);
3027
3028 SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_pdapi_event);
3029 SCTP_BUF_NEXT(m_notify) = NULL;
3030 control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
3031 0, 0, 0, 0, 0, 0,
3032 m_notify);
3033 if (control == NULL) {

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

3260 sctp_notify_send_failed(stcb, error,
3261 (struct sctp_tmit_chunk *)data);
3262 break;
3263 case SCTP_NOTIFY_ADAPTATION_INDICATION:
3264 /* Here the error is the adaptation indication */
3265 sctp_notify_adaptation_layer(stcb, error);
3266 break;
3267 case SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION:
3028 pdapi->pdapi_assoc_id = sctp_get_associd(stcb);
3029
3030 SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_pdapi_event);
3031 SCTP_BUF_NEXT(m_notify) = NULL;
3032 control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
3033 0, 0, 0, 0, 0, 0,
3034 m_notify);
3035 if (control == NULL) {

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

3262 sctp_notify_send_failed(stcb, error,
3263 (struct sctp_tmit_chunk *)data);
3264 break;
3265 case SCTP_NOTIFY_ADAPTATION_INDICATION:
3266 /* Here the error is the adaptation indication */
3267 sctp_notify_adaptation_layer(stcb, error);
3268 break;
3269 case SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION:
3268 sctp_notify_partial_delivery_indication(stcb, error, 0);
3270 {
3271 uint32_t val;
3272
3273 val = *((uint32_t *) data);
3274
3275 sctp_notify_partial_delivery_indication(stcb, error, 0, val);
3276 }
3269 break;
3270 case SCTP_NOTIFY_STRDATA_ERR:
3271 break;
3272 case SCTP_NOTIFY_ASSOC_ABORTED:
3273 if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) ||
3274 ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) {
3275 sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, NULL);
3276 } else {

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

4798 goto restart;
4799 }
4800 if (control->length == 0) {
4801 if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_FRAG_INTERLEAVE)) &&
4802 (filling_sinfo)) {
4803 /* find a more suitable one then this */
4804 ctl = TAILQ_NEXT(control, next);
4805 while (ctl) {
3277 break;
3278 case SCTP_NOTIFY_STRDATA_ERR:
3279 break;
3280 case SCTP_NOTIFY_ASSOC_ABORTED:
3281 if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) ||
3282 ((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) {
3283 sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, NULL);
3284 } else {

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

4806 goto restart;
4807 }
4808 if (control->length == 0) {
4809 if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_FRAG_INTERLEAVE)) &&
4810 (filling_sinfo)) {
4811 /* find a more suitable one then this */
4812 ctl = TAILQ_NEXT(control, next);
4813 while (ctl) {
4806 if ((ctl->stcb != control->stcb) && (ctl->length)) {
4807 /* found one */
4814 if ((ctl->stcb != control->stcb) && (ctl->length) &&
4815 (ctl->some_taken ||
4816 ((ctl->do_not_ref_stcb == 0) &&
4817 (ctl->stcb->asoc.strmin[ctl->sinfo_stream].delivery_started == 0)))
4818 ) {
4819 /*-
4820 * If we have a different TCB next, and there is data
4821 * present. If we have already taken some (pdapi), OR we can
4822 * ref the tcb and no delivery as started on this stream, we
4823 * take it.
4824 */
4808 control = ctl;
4809 goto found_one;
4825 control = ctl;
4826 goto found_one;
4827 } else if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_INTERLEAVE_STRMS)) &&
4828 (ctl->length) &&
4829 ((ctl->some_taken) ||
4830 ((ctl->do_not_ref_stcb == 0) &&
4831 (ctl->stcb->asoc.strmin[ctl->sinfo_stream].delivery_started == 0)))
4832 ) {
4833 /*-
4834 * If we have the same tcb, and there is data present, and we
4835 * have the strm interleave feature present. Then if we have
4836 * taken some (pdapi) or we can refer to tht tcb AND we have
4837 * not started a delivery for this stream, we can take it.
4838 */
4839 control = ctl;
4840 goto found_one;
4810 }
4811 ctl = TAILQ_NEXT(ctl, next);
4812 }
4813 }
4814 /*
4815 * if we reach here, not suitable replacement is available
4816 * <or> fragment interleave is NOT on. So stuff the sb_cc
4817 * into the our held count, and its time to sleep again.

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

4826 SCTP_INP_READ_UNLOCK(inp);
4827 hold_rlock = 0;
4828 }
4829found_one:
4830 /*
4831 * If we reach here, control has a some data for us to read off.
4832 * Note that stcb COULD be NULL.
4833 */
4841 }
4842 ctl = TAILQ_NEXT(ctl, next);
4843 }
4844 }
4845 /*
4846 * if we reach here, not suitable replacement is available
4847 * <or> fragment interleave is NOT on. So stuff the sb_cc
4848 * into the our held count, and its time to sleep again.

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

4857 SCTP_INP_READ_UNLOCK(inp);
4858 hold_rlock = 0;
4859 }
4860found_one:
4861 /*
4862 * If we reach here, control has a some data for us to read off.
4863 * Note that stcb COULD be NULL.
4864 */
4865 if (control->do_not_ref_stcb == 0) {
4866 control->stcb->asoc.strmin[ctl->sinfo_stream].delivery_started = 1;
4867 }
4868 control->some_taken = 1;
4834 if (hold_sblock) {
4835 SOCKBUF_UNLOCK(&so->so_rcv);
4836 hold_sblock = 0;
4837 }
4838 stcb = control->stcb;
4839 if (stcb) {
4840 if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) &&
4841 (control->do_not_ref_stcb == 0)) {

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

4869 /* First lets get off the sinfo and sockaddr info */
4870 if ((sinfo) && filling_sinfo) {
4871 memcpy(sinfo, control, sizeof(struct sctp_nonpad_sndrcvinfo));
4872 nxt = TAILQ_NEXT(control, next);
4873 if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_EXT_RCVINFO)) {
4874 struct sctp_extrcvinfo *s_extra;
4875
4876 s_extra = (struct sctp_extrcvinfo *)sinfo;
4869 if (hold_sblock) {
4870 SOCKBUF_UNLOCK(&so->so_rcv);
4871 hold_sblock = 0;
4872 }
4873 stcb = control->stcb;
4874 if (stcb) {
4875 if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) &&
4876 (control->do_not_ref_stcb == 0)) {

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

4904 /* First lets get off the sinfo and sockaddr info */
4905 if ((sinfo) && filling_sinfo) {
4906 memcpy(sinfo, control, sizeof(struct sctp_nonpad_sndrcvinfo));
4907 nxt = TAILQ_NEXT(control, next);
4908 if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_EXT_RCVINFO)) {
4909 struct sctp_extrcvinfo *s_extra;
4910
4911 s_extra = (struct sctp_extrcvinfo *)sinfo;
4877 if (nxt) {
4878 s_extra->next_flags = SCTP_NEXT_MSG_AVAIL;
4912 if ((nxt) &&
4913 (nxt->length)) {
4914 s_extra->sreinfo_next_flags = SCTP_NEXT_MSG_AVAIL;
4879 if (nxt->sinfo_flags & SCTP_UNORDERED) {
4915 if (nxt->sinfo_flags & SCTP_UNORDERED) {
4880 s_extra->next_flags |= SCTP_NEXT_MSG_IS_UNORDERED;
4916 s_extra->sreinfo_next_flags |= SCTP_NEXT_MSG_IS_UNORDERED;
4881 }
4882 if (nxt->spec_flags & M_NOTIFICATION) {
4917 }
4918 if (nxt->spec_flags & M_NOTIFICATION) {
4883 s_extra->next_flags |= SCTP_NEXT_MSG_IS_NOTIFICATION;
4919 s_extra->sreinfo_next_flags |= SCTP_NEXT_MSG_IS_NOTIFICATION;
4884 }
4920 }
4885 s_extra->next_asocid = nxt->sinfo_assoc_id;
4886 s_extra->next_length = nxt->length;
4887 s_extra->next_ppid = nxt->sinfo_ppid;
4888 s_extra->next_stream = nxt->sinfo_stream;
4921 s_extra->sreinfo_next_aid = nxt->sinfo_assoc_id;
4922 s_extra->sreinfo_next_length = nxt->length;
4923 s_extra->sreinfo_next_ppid = nxt->sinfo_ppid;
4924 s_extra->sreinfo_next_stream = nxt->sinfo_stream;
4889 if (nxt->tail_mbuf != NULL) {
4890 if (nxt->end_added) {
4925 if (nxt->tail_mbuf != NULL) {
4926 if (nxt->end_added) {
4891 s_extra->next_flags |= SCTP_NEXT_MSG_ISCOMPLETE;
4927 s_extra->sreinfo_next_flags |= SCTP_NEXT_MSG_ISCOMPLETE;
4892 }
4893 }
4894 } else {
4895 /*
4896 * we explicitly 0 this, since the memcpy
4897 * got some other things beyond the older
4898 * sinfo_ that is on the control's structure
4899 * :-D
4900 */
4928 }
4929 }
4930 } else {
4931 /*
4932 * we explicitly 0 this, since the memcpy
4933 * got some other things beyond the older
4934 * sinfo_ that is on the control's structure
4935 * :-D
4936 */
4901 s_extra->next_flags = SCTP_NO_NEXT_MSG;
4902 s_extra->next_asocid = 0;
4903 s_extra->next_length = 0;
4904 s_extra->next_ppid = 0;
4905 s_extra->next_stream = 0;
4937 nxt = NULL;
4938 s_extra->sreinfo_next_flags = SCTP_NO_NEXT_MSG;
4939 s_extra->sreinfo_next_aid = 0;
4940 s_extra->sreinfo_next_length = 0;
4941 s_extra->sreinfo_next_ppid = 0;
4942 s_extra->sreinfo_next_stream = 0;
4906 }
4907 }
4908 /*
4909 * update off the real current cum-ack, if we have an stcb.
4910 */
4911 if (stcb)
4912 sinfo->sinfo_cumtsn = stcb->asoc.cumulative_tsn;
4913 /*

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

5018 so->so_rcv.sb_cc,
5019 control->length,
5020 cp_len,
5021 0);
5022#endif
5023 if ((SCTP_BUF_NEXT(m) == NULL) &&
5024 (control->end_added)) {
5025 out_flags |= MSG_EOR;
4943 }
4944 }
4945 /*
4946 * update off the real current cum-ack, if we have an stcb.
4947 */
4948 if (stcb)
4949 sinfo->sinfo_cumtsn = stcb->asoc.cumulative_tsn;
4950 /*

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

5055 so->so_rcv.sb_cc,
5056 control->length,
5057 cp_len,
5058 0);
5059#endif
5060 if ((SCTP_BUF_NEXT(m) == NULL) &&
5061 (control->end_added)) {
5062 out_flags |= MSG_EOR;
5063 if (control->do_not_ref_stcb == 0)
5064 control->stcb->asoc.strmin[ctl->sinfo_stream].delivery_started = 0;
5026 }
5027 if (control->spec_flags & M_NOTIFICATION) {
5028 out_flags |= MSG_NOTIFICATION;
5029 }
5030 /* we ate up the mbuf */
5031 if (in_flags & MSG_PEEK) {
5032 /* just looking */
5033 m = SCTP_BUF_NEXT(m);

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

5288 SOCKBUF_UNLOCK(&so->so_rcv);
5289 hold_sblock = 0;
5290 }
5291 if (control->length == 0) {
5292 /* still nothing here */
5293 if (control->end_added == 1) {
5294 /* he aborted, or is done i.e.did a shutdown */
5295 out_flags |= MSG_EOR;
5065 }
5066 if (control->spec_flags & M_NOTIFICATION) {
5067 out_flags |= MSG_NOTIFICATION;
5068 }
5069 /* we ate up the mbuf */
5070 if (in_flags & MSG_PEEK) {
5071 /* just looking */
5072 m = SCTP_BUF_NEXT(m);

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

5327 SOCKBUF_UNLOCK(&so->so_rcv);
5328 hold_sblock = 0;
5329 }
5330 if (control->length == 0) {
5331 /* still nothing here */
5332 if (control->end_added == 1) {
5333 /* he aborted, or is done i.e.did a shutdown */
5334 out_flags |= MSG_EOR;
5296 if (control->pdapi_aborted)
5335 if (control->pdapi_aborted) {
5336 if (control->do_not_ref_stcb == 0)
5337 control->stcb->asoc.strmin[ctl->sinfo_stream].delivery_started = 0;
5338
5297 out_flags |= MSG_TRUNC;
5339 out_flags |= MSG_TRUNC;
5340 } else {
5341 if (control->do_not_ref_stcb == 0)
5342 control->stcb->asoc.strmin[ctl->sinfo_stream].delivery_started = 0;
5343 }
5298 goto done_with_control;
5299 }
5300 if (so->so_rcv.sb_cc > held_length) {
5301 control->held_length = so->so_rcv.sb_cc;
5302 held_length = 0;
5303 }
5304 goto wait_some_more;
5305 } else if (control->data == NULL) {

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

5338 /* Need to get rlock */
5339 if (hold_rlock == 0) {
5340 SCTP_INP_READ_LOCK(inp);
5341 hold_rlock = 1;
5342 }
5343 }
5344 if (control->end_added) {
5345 out_flags |= MSG_EOR;
5344 goto done_with_control;
5345 }
5346 if (so->so_rcv.sb_cc > held_length) {
5347 control->held_length = so->so_rcv.sb_cc;
5348 held_length = 0;
5349 }
5350 goto wait_some_more;
5351 } else if (control->data == NULL) {

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

5384 /* Need to get rlock */
5385 if (hold_rlock == 0) {
5386 SCTP_INP_READ_LOCK(inp);
5387 hold_rlock = 1;
5388 }
5389 }
5390 if (control->end_added) {
5391 out_flags |= MSG_EOR;
5392 if (control->do_not_ref_stcb == 0)
5393 control->stcb->asoc.strmin[ctl->sinfo_stream].delivery_started = 0;
5346 }
5347 if (control->spec_flags & M_NOTIFICATION) {
5348 out_flags |= MSG_NOTIFICATION;
5349 }
5350 if (uio)
5351 uio->uio_resid -= control->length;
5352 *mp = control->data;
5353 m = control->data;

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

5400 if (control->length == 0) {
5401 /* still nothing here */
5402 if (control->end_added == 1) {
5403 /*
5404 * he aborted, or is done i.e.
5405 * shutdown
5406 */
5407 out_flags |= MSG_EOR;
5394 }
5395 if (control->spec_flags & M_NOTIFICATION) {
5396 out_flags |= MSG_NOTIFICATION;
5397 }
5398 if (uio)
5399 uio->uio_resid -= control->length;
5400 *mp = control->data;
5401 m = control->data;

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

5448 if (control->length == 0) {
5449 /* still nothing here */
5450 if (control->end_added == 1) {
5451 /*
5452 * he aborted, or is done i.e.
5453 * shutdown
5454 */
5455 out_flags |= MSG_EOR;
5408 if (control->pdapi_aborted)
5456 if (control->pdapi_aborted) {
5409 out_flags |= MSG_TRUNC;
5457 out_flags |= MSG_TRUNC;
5458 if (control->do_not_ref_stcb == 0)
5459 control->stcb->asoc.strmin[ctl->sinfo_stream].delivery_started = 0;
5460 }
5410 goto done_with_control;
5411 }
5412 if (so->so_rcv.sb_cc > held_length) {
5413 control->held_length = so->so_rcv.sb_cc;
5414 /*
5415 * We don't use held_length while
5416 * getting a message
5417 */

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

5530 if ((freed_so_far >= rwnd_req) &&
5531 (control && (control->do_not_ref_stcb == 0)) &&
5532 (no_rcv_needed == 0))
5533 sctp_user_rcvd(stcb, &freed_so_far, hold_rlock, rwnd_req);
5534 }
5535 if (msg_flags)
5536 *msg_flags |= out_flags;
5537out:
5461 goto done_with_control;
5462 }
5463 if (so->so_rcv.sb_cc > held_length) {
5464 control->held_length = so->so_rcv.sb_cc;
5465 /*
5466 * We don't use held_length while
5467 * getting a message
5468 */

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

5581 if ((freed_so_far >= rwnd_req) &&
5582 (control && (control->do_not_ref_stcb == 0)) &&
5583 (no_rcv_needed == 0))
5584 sctp_user_rcvd(stcb, &freed_so_far, hold_rlock, rwnd_req);
5585 }
5586 if (msg_flags)
5587 *msg_flags |= out_flags;
5588out:
5589 if (((out_flags & MSG_EOR) == 0) &&
5590 ((in_flags & MSG_PEEK) == 0) &&
5591 (sinfo) &&
5592 (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_EXT_RCVINFO))) {
5593 struct sctp_extrcvinfo *s_extra;
5594
5595 s_extra = (struct sctp_extrcvinfo *)sinfo;
5596 s_extra->sreinfo_next_flags = SCTP_NO_NEXT_MSG;
5597 }
5538 if (hold_rlock == 1) {
5539 SCTP_INP_READ_UNLOCK(inp);
5540 hold_rlock = 0;
5541 }
5542 if (hold_sblock) {
5543 SOCKBUF_UNLOCK(&so->so_rcv);
5544 hold_sblock = 0;
5545 }

--- 159 unchanged lines hidden ---
5598 if (hold_rlock == 1) {
5599 SCTP_INP_READ_UNLOCK(inp);
5600 hold_rlock = 0;
5601 }
5602 if (hold_sblock) {
5603 SOCKBUF_UNLOCK(&so->so_rcv);
5604 hold_sblock = 0;
5605 }

--- 159 unchanged lines hidden ---