svn commit: r234814 - stable/8/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sun Apr 29 18:52:23 UTC 2012


Author: tuexen
Date: Sun Apr 29 18:52:22 2012
New Revision: 234814
URL: http://svn.freebsd.org/changeset/base/234814

Log:
  MFC r234614:
  Use the flags defined in RFC 6525 in the stream reset event.

Modified:
  stable/8/sys/netinet/sctp_uio.h
  stable/8/sys/netinet/sctputil.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/netinet/sctp_uio.h
==============================================================================
--- stable/8/sys/netinet/sctp_uio.h	Sun Apr 29 18:50:16 2012	(r234813)
+++ stable/8/sys/netinet/sctp_uio.h	Sun Apr 29 18:52:22 2012	(r234814)
@@ -449,9 +449,11 @@ struct sctp_stream_reset_event {
 };
 
 /* flags in stream_reset_event (strreset_flags) */
-#define SCTP_STREAM_RESET_DENIED        0x0004	/* SCTP_STRRESET_FAILED */
-#define SCTP_STREAM_RESET_FAILED        0x0008	/* SCTP_STRRESET_FAILED */
-#define SCTP_STREAM_CHANGED_DENIED	0x0010
+#define SCTP_STREAM_RESET_INCOMING_SSN  0x0001
+#define SCTP_STREAM_RESET_OUTGOING_SSN  0x0002
+#define SCTP_STREAM_RESET_DENIED        0x0004
+#define SCTP_STREAM_RESET_FAILED        0x0008
+#define SCTP_STREAM_CHANGED_DENIED      0x0010
 
 /*
  * Assoc reset event - subscribe to SCTP_ASSOC_RESET_EVENT

Modified: stable/8/sys/netinet/sctputil.c
==============================================================================
--- stable/8/sys/netinet/sctputil.c	Sun Apr 29 18:50:16 2012	(r234813)
+++ stable/8/sys/netinet/sctputil.c	Sun Apr 29 18:52:22 2012	(r234814)
@@ -3498,18 +3498,18 @@ sctp_ulp_notify(uint32_t notification, s
 	case SCTP_NOTIFY_HB_RESP:
 		break;
 	case SCTP_NOTIFY_STR_RESET_SEND:
-		sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_INCOMING);
+		sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING_SSN);
 		break;
 	case SCTP_NOTIFY_STR_RESET_RECV:
-		sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING);
+		sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_INCOMING);
 		break;
 	case SCTP_NOTIFY_STR_RESET_FAILED_OUT:
 		sctp_notify_stream_reset(stcb, error, ((uint16_t *) data),
-		    (SCTP_STREAM_RESET_OUTGOING | SCTP_STREAM_RESET_INCOMING));
+		    (SCTP_STREAM_RESET_OUTGOING_SSN | SCTP_STREAM_RESET_FAILED));
 		break;
 	case SCTP_NOTIFY_STR_RESET_FAILED_IN:
 		sctp_notify_stream_reset(stcb, error, ((uint16_t *) data),
-		    (SCTP_STREAM_RESET_OUTGOING | SCTP_STREAM_RESET_INCOMING));
+		    (SCTP_STREAM_RESET_INCOMING | SCTP_STREAM_RESET_FAILED));
 		break;
 	case SCTP_NOTIFY_ASCONF_ADD_IP:
 		sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data,


More information about the svn-src-stable mailing list