Deleted Added
full compact
sctp_asconf.c (228907) sctp_asconf.c (235360)
1/*-
2 * Copyright (c) 2001-2007, 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_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */
34
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2007, 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_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 228907 2011-12-27 10:16:24Z tuexen $");
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 235360 2012-05-12 20:11:35Z tuexen $");
37#include <netinet/sctp_os.h>
38#include <netinet/sctp_var.h>
39#include <netinet/sctp_sysctl.h>
40#include <netinet/sctp_pcb.h>
41#include <netinet/sctp_header.h>
42#include <netinet/sctputil.h>
43#include <netinet/sctp_output.h>
44#include <netinet/sctp_asconf.h>

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

1784 */
1785
1786 /*
1787 * if the serial number is the next expected, but I didn't send it,
1788 * abort the asoc, since someone probably just hijacked us...
1789 */
1790 if (serial_num == (asoc->asconf_seq_out + 1)) {
1791 SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n");
37#include <netinet/sctp_os.h>
38#include <netinet/sctp_var.h>
39#include <netinet/sctp_sysctl.h>
40#include <netinet/sctp_pcb.h>
41#include <netinet/sctp_header.h>
42#include <netinet/sctputil.h>
43#include <netinet/sctp_output.h>
44#include <netinet/sctp_asconf.h>

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

1784 */
1785
1786 /*
1787 * if the serial number is the next expected, but I didn't send it,
1788 * abort the asoc, since someone probably just hijacked us...
1789 */
1790 if (serial_num == (asoc->asconf_seq_out + 1)) {
1791 SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n");
1792 sctp_abort_an_association(stcb->sctp_ep, stcb,
1793 SCTP_CAUSE_ILLEGAL_ASCONF_ACK, NULL, SCTP_SO_NOT_LOCKED);
1792 sctp_abort_an_association(stcb->sctp_ep, stcb, NULL, SCTP_SO_NOT_LOCKED);
1794 *abort_no_unlock = 1;
1795 return;
1796 }
1797 if (serial_num != asoc->asconf_seq_out_acked + 1) {
1798 /* got a duplicate/unexpected ASCONF-ACK */
1799 SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got duplicate/unexpected serial number = %xh (expected = %xh)\n",
1800 serial_num, asoc->asconf_seq_out_acked + 1);
1801 return;

--- 1788 unchanged lines hidden ---
1793 *abort_no_unlock = 1;
1794 return;
1795 }
1796 if (serial_num != asoc->asconf_seq_out_acked + 1) {
1797 /* got a duplicate/unexpected ASCONF-ACK */
1798 SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got duplicate/unexpected serial number = %xh (expected = %xh)\n",
1799 serial_num, asoc->asconf_seq_out_acked + 1);
1800 return;

--- 1788 unchanged lines hidden ---