Deleted Added
full compact
sctp_indata.c (170138) sctp_indata.c (170181)
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.

--- 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_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */
32
33#include <sys/cdefs.h>
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.

--- 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_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_indata.c 170138 2007-05-30 17:39:45Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_indata.c 170181 2007-06-01 11:19:54Z rrs $");
35
36#include <netinet/sctp_os.h>
37#include <netinet/sctp_var.h>
38#include <netinet/sctp_sysctl.h>
39#include <netinet/sctp_pcb.h>
40#include <netinet/sctp_header.h>
41#include <netinet/sctputil.h>
42#include <netinet/sctp_output.h>

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

2592 ippp = (uint32_t *) (ph + 1);
2593 *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_19);
2594 ippp++;
2595 *ippp = asoc->cumulative_tsn;
2596
2597 }
2598 stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19;
2599 sctp_abort_association(inp, stcb, m, iphlen, sh,
35
36#include <netinet/sctp_os.h>
37#include <netinet/sctp_var.h>
38#include <netinet/sctp_sysctl.h>
39#include <netinet/sctp_pcb.h>
40#include <netinet/sctp_header.h>
41#include <netinet/sctputil.h>
42#include <netinet/sctp_output.h>

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

2592 ippp = (uint32_t *) (ph + 1);
2593 *ippp = htonl(SCTP_FROM_SCTP_INDATA + SCTP_LOC_19);
2594 ippp++;
2595 *ippp = asoc->cumulative_tsn;
2596
2597 }
2598 stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_19;
2599 sctp_abort_association(inp, stcb, m, iphlen, sh,
2600 op_err, 0, 0);
2600 op_err, 0);
2601 return (2);
2602 }
2603#ifdef SCTP_AUDITING_ENABLED
2604 sctp_audit_log(0xB1, 0);
2605#endif
2606 if (SCTP_SIZE32(chk_length) == (length - *offset)) {
2607 last_chunk = 1;
2608 } else {

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

2655 * may later want to add sysctl stuff to
2656 * switch out and do either an ABORT() or
2657 * possibly process them.
2658 */
2659 if (sctp_strict_data_order) {
2660 struct mbuf *op_err;
2661
2662 op_err = sctp_generate_invmanparam(SCTP_CAUSE_PROTOCOL_VIOLATION);
2601 return (2);
2602 }
2603#ifdef SCTP_AUDITING_ENABLED
2604 sctp_audit_log(0xB1, 0);
2605#endif
2606 if (SCTP_SIZE32(chk_length) == (length - *offset)) {
2607 last_chunk = 1;
2608 } else {

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

2655 * may later want to add sysctl stuff to
2656 * switch out and do either an ABORT() or
2657 * possibly process them.
2658 */
2659 if (sctp_strict_data_order) {
2660 struct mbuf *op_err;
2661
2662 op_err = sctp_generate_invmanparam(SCTP_CAUSE_PROTOCOL_VIOLATION);
2663 sctp_abort_association(inp, stcb, m, iphlen, sh, op_err, 0, 0);
2663 sctp_abort_association(inp, stcb, m, iphlen, sh, op_err, 0);
2664 return (2);
2665 }
2666 break;
2667 default:
2668 /* unknown chunk type, use bit rules */
2669 if (ch->ch.chunk_type & 0x40) {
2670 /* Add a error report to the queue */
2671 struct mbuf *merr;

--- 3265 unchanged lines hidden ---
2664 return (2);
2665 }
2666 break;
2667 default:
2668 /* unknown chunk type, use bit rules */
2669 if (ch->ch.chunk_type & 0x40) {
2670 /* Add a error report to the queue */
2671 struct mbuf *merr;

--- 3265 unchanged lines hidden ---