diff --git a/sys/netinet/sctp_uio.h b/sys/netinet/sctp_uio.h index f19e3b9e0ff6..54d7457f90af 100644 --- a/sys/netinet/sctp_uio.h +++ b/sys/netinet/sctp_uio.h @@ -660,6 +660,7 @@ struct sctp_authkeyid { /* SCTP_PEER_AUTH_CHUNKS / SCTP_LOCAL_AUTH_CHUNKS */ struct sctp_authchunks { sctp_assoc_t gauth_assoc_id; + uint32_t gauth_number_of_chunks; uint8_t gauth_chunks[]; }; diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 83585d93220d..e5d793b840d2 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -2879,6 +2879,7 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize, } else { /* copy in the chunks */ (void)sctp_serialize_auth_chunks(chklist, sac->gauth_chunks); + sac->gauth_number_of_chunks = (uint32_t) size; *optsize = sizeof(struct sctp_authchunks) + size; } SCTP_TCB_UNLOCK(stcb); @@ -2897,6 +2898,7 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize, } else { /* copy in the chunks */ (void)sctp_serialize_auth_chunks(chklist, sac->gauth_chunks); + sac->gauth_number_of_chunks = (uint32_t) size; *optsize = sizeof(struct sctp_authchunks) + size; } SCTP_INP_RUNLOCK(inp); @@ -2927,6 +2929,7 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize, } else { /* copy in the chunks */ (void)sctp_serialize_auth_chunks(chklist, sac->gauth_chunks); + sac->gauth_number_of_chunks = (uint32_t) size; *optsize = sizeof(struct sctp_authchunks) + size; } SCTP_TCB_UNLOCK(stcb);