svn commit: r363045 - stable/12/sys/netinet

Mark Johnston markj at FreeBSD.org
Thu Jul 9 14:42:42 UTC 2020


Author: markj
Date: Thu Jul  9 14:42:41 2020
New Revision: 363045
URL: https://svnweb.freebsd.org/changeset/base/363045

Log:
  MFC r362497:
  Move the definition of SCTP's system_base_info into sctp_crc32.c.

Modified:
  stable/12/sys/netinet/sctp_crc32.c
  stable/12/sys/netinet/sctp_pcb.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/sctp_crc32.c
==============================================================================
--- stable/12/sys/netinet/sctp_crc32.c	Thu Jul  9 14:18:14 2020	(r363044)
+++ stable/12/sys/netinet/sctp_crc32.c	Thu Jul  9 14:42:41 2020	(r363045)
@@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
 
 #include <netinet/sctp.h>
 #include <netinet/sctp_crc32.h>
-#ifdef SCTP
+#if defined(SCTP) || defined(SCTP_SUPPORT)
 #include <netinet/sctp_os.h>
 #include <netinet/sctp_crc32.h>
 #include <netinet/sctp_pcb.h>
@@ -116,6 +116,9 @@ sctp_calculate_cksum(struct mbuf *m, uint32_t offset)
 }
 
 #if defined(SCTP) || defined(SCTP_SUPPORT)
+
+VNET_DEFINE(struct sctp_base_info, system_base_info);
+
 /*
  * Compute and insert the SCTP checksum in network byte order for a given
  * mbuf chain m which contains an SCTP packet starting at offset.
@@ -126,10 +129,8 @@ sctp_delayed_cksum(struct mbuf *m, uint32_t offset)
 	uint32_t checksum;
 
 	checksum = sctp_calculate_cksum(m, offset);
-#ifdef SCTP
 	SCTP_STAT_DECR(sctps_sendhwcrc);
 	SCTP_STAT_INCR(sctps_sendswcrc);
-#endif
 	offset += offsetof(struct sctphdr, checksum);
 
 	if (offset + sizeof(uint32_t) > (uint32_t)(m->m_len)) {

Modified: stable/12/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/12/sys/netinet/sctp_pcb.c	Thu Jul  9 14:18:14 2020	(r363044)
+++ stable/12/sys/netinet/sctp_pcb.c	Thu Jul  9 14:42:41 2020	(r363045)
@@ -57,9 +57,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/smp.h>
 #include <sys/unistd.h>
 
-
-VNET_DEFINE(struct sctp_base_info, system_base_info);
-
 /* FIX: we don't handle multiple link local scopes */
 /* "scopeless" replacement IN6_ARE_ADDR_EQUAL */
 #ifdef INET6


More information about the svn-src-all mailing list