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

Michael Tuexen tuexen at FreeBSD.org
Wed May 6 22:26:24 UTC 2020


Author: tuexen
Date: Wed May  6 22:26:23 2020
New Revision: 360716
URL: https://svnweb.freebsd.org/changeset/base/360716

Log:
  MFC r350488: Cleanup in SCTP code
  
  Small cleanup, no functional change intended.

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

Modified: stable/11/sys/netinet/sctp_output.c
==============================================================================
--- stable/11/sys/netinet/sctp_output.c	Wed May  6 22:24:26 2020	(r360715)
+++ stable/11/sys/netinet/sctp_output.c	Wed May  6 22:26:23 2020	(r360716)
@@ -9083,7 +9083,6 @@ sctp_send_heartbeat_ack(struct sctp_tcb *stcb,
 	struct sctp_chunkhdr *chdr;
 	struct sctp_tmit_chunk *chk;
 
-
 	if (net == NULL)
 		/* must have a net pointer */
 		return;
@@ -9101,13 +9100,8 @@ sctp_send_heartbeat_ack(struct sctp_tcb *stcb,
 	chdr = mtod(outchain, struct sctp_chunkhdr *);
 	chdr->chunk_type = SCTP_HEARTBEAT_ACK;
 	chdr->chunk_flags = 0;
-	if (chk_length % 4) {
-		/* need pad */
-		uint32_t cpthis = 0;
-		int padlen;
-
-		padlen = 4 - (chk_length % 4);
-		m_copyback(outchain, chk_length, padlen, (caddr_t)&cpthis);
+	if (chk_length % 4 != 0) {
+		sctp_pad_lastmbuf(outchain, 4 - (chk_length % 4), NULL);
 	}
 	sctp_alloc_a_chunk(stcb, chk);
 	if (chk == NULL) {


More information about the svn-src-all mailing list