Skip to contentSkip to conversation

setsockopt: add missing SCTP socket layer options

PATCH In review Daniel Borkmann 2 participants 2 messages May 3, 2013 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 setsockopt: add missing SCTP socket layer options

In reply to a message not in the archive

There are a couple of missing socket options for SCTP, so simply add them to the list.

---
 include/compat.h      | 1 +
 syscalls/setsockopt.h | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)
include/compat.h +1 -0
index 3af8af4..a1f3d42 100644
@@ -416,6 +416,7 @@ enum kcmp_type {
 #define SCTP_GET_LOCAL_ADDRS    109             /* Get all local address. */
 #define SCTP_SOCKOPT_CONNECTX   110             /* CONNECTX requests. */
 #define SCTP_SOCKOPT_CONNECTX3  111     /* CONNECTX requests (updated) */
+#define SCTP_GET_ASSOC_STATS    112	/* Read only */
 #endif
 
 /* linux/rxrpc.h */
syscalls/setsockopt.h +4 -4
index ced1099..28204dc 100644
@@ -103,7 +103,7 @@ static int ipv6_opts[NR_SOL_IPV6_OPTS] = {
 #define NR_SOL_ICMPV6_OPTS 1
 static int icmpv6_opts[NR_SOL_ICMPV6_OPTS] = { ICMPV6_FILTER };
 
-#define NR_SOL_SCTP_OPTS 39
+#define NR_SOL_SCTP_OPTS 41
 static int sctp_opts[NR_SOL_SCTP_OPTS] = {
 	SCTP_RTOINFO, SCTP_ASSOCINFO, SCTP_INITMSG, SCTP_NODELAY,
 	SCTP_AUTOCLOSE, SCTP_SET_PEER_PRIMARY_ADDR, SCTP_PRIMARY_ADDR, SCTP_ADAPTATION_LAYER,
@@ -112,10 +112,10 @@ static int sctp_opts[NR_SOL_SCTP_OPTS] = {
 	SCTP_DELAYED_ACK_TIME, SCTP_CONTEXT, SCTP_FRAGMENT_INTERLEAVE, SCTP_PARTIAL_DELIVERY_POINT,
 	SCTP_MAX_BURST, SCTP_AUTH_CHUNK, SCTP_HMAC_IDENT, SCTP_AUTH_KEY,
 	SCTP_AUTH_ACTIVE_KEY, SCTP_AUTH_DELETE_KEY, SCTP_PEER_AUTH_CHUNKS, SCTP_LOCAL_AUTH_CHUNKS,
-	SCTP_GET_ASSOC_NUMBER, SCTP_GET_ASSOC_ID_LIST, SCTP_AUTO_ASCONF,
-
+	SCTP_GET_ASSOC_NUMBER, SCTP_GET_ASSOC_ID_LIST, SCTP_AUTO_ASCONF, SCTP_PEER_ADDR_THLDS,
 	SCTP_SOCKOPT_BINDX_ADD, SCTP_SOCKOPT_BINDX_REM, SCTP_SOCKOPT_PEELOFF, SCTP_SOCKOPT_CONNECTX_OLD,
-	SCTP_GET_PEER_ADDRS, SCTP_GET_LOCAL_ADDRS, SCTP_SOCKOPT_CONNECTX, SCTP_SOCKOPT_CONNECTX3 };
+	SCTP_GET_PEER_ADDRS, SCTP_GET_LOCAL_ADDRS, SCTP_SOCKOPT_CONNECTX, SCTP_SOCKOPT_CONNECTX3,
+	SCTP_GET_ASSOC_STATS };
 
 #define NR_SOL_AX25_OPTS 12
 static int ax25_opts[NR_SOL_AX25_OPTS] = {
Signature · 1 line
1.7.11.7
#2 lore raw
Quoted 2 lines · Daniel Borkmann

There are a couple of missing socket options for SCTP, so simply add them to the list.

Well spotted. Added and pushed out.

thanks,

Dave