svn commit: r347663 - stable/11/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Thu May 16 09:02:32 UTC 2019


Author: tuexen
Date: Thu May 16 09:02:30 2019
New Revision: 347663
URL: https://svnweb.freebsd.org/changeset/base/347663

Log:
  MFC r344721:
  
  Report the correct length when using the IPPROTO_SCTP level
  socket options SCTP_GET_PEER_ADDRESSES and SCTP_GET_LOCAL_ADDRESSES.

Modified:
  stable/11/sys/netinet/sctp_usrreq.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/11/sys/netinet/sctp_usrreq.c	Thu May 16 08:57:08 2019	(r347662)
+++ stable/11/sys/netinet/sctp_usrreq.c	Thu May 16 09:02:30 2019	(r347663)
@@ -2240,8 +2240,8 @@ flags_out:
 			SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id);
 
 			if (stcb) {
-				left = (*optsize) - sizeof(struct sctp_getaddresses);
-				*optsize = sizeof(struct sctp_getaddresses);
+				left = (*optsize) - sizeof(sctp_assoc_t);
+				*optsize = sizeof(sctp_assoc_t);
 				sas = (struct sockaddr_storage *)&saddr->addr[0];
 
 				TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
@@ -2315,7 +2315,7 @@ flags_out:
 			if (stcb) {
 				SCTP_TCB_UNLOCK(stcb);
 			}
-			*optsize = sizeof(struct sockaddr_storage) + actual;
+			*optsize = sizeof(sctp_assoc_t) + actual;
 			break;
 		}
 	case SCTP_PEER_ADDR_PARAMS:


More information about the svn-src-all mailing list