Date: Wed, 6 May 2020 22:26:24 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360716 - stable/11/sys/netinet Message-ID: <202005062226.046MQOL8041942@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005062226.046MQOL8041942>