svn commit: r333980 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Mon May 21 14:52:19 UTC 2018


Author: tuexen
Date: Mon May 21 14:52:18 2018
New Revision: 333980
URL: https://svnweb.freebsd.org/changeset/base/333980

Log:
  Do the appropriate accounting when ip_output() fails.

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Mon May 21 14:51:20 2018	(r333979)
+++ head/sys/netinet/sctp_output.c	Mon May 21 14:52:18 2018	(r333980)
@@ -11030,9 +11030,8 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad
 	struct sctp_chunkhdr *ch;
 #if defined(INET) || defined(INET6)
 	struct udphdr *udp;
-	int ret __unused;
 #endif
-	int len, cause_len, padding_len;
+	int ret, len, cause_len, padding_len;
 #ifdef INET
 	struct sockaddr_in *src_sin, *dst_sin;
 	struct ip *ip;
@@ -11259,9 +11258,13 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad
 		SCTP_LTRACE_ERR_RET_PKT(mout, NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT);
 		return;
 	}
+	SCTPDBG(SCTP_DEBUG_OUTPUT3, "return from send is %d\n", ret);
 	SCTP_STAT_INCR(sctps_sendpackets);
 	SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
 	SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
+	if (ret) {
+		SCTP_STAT_INCR(sctps_senderrors);
+	}
 	return;
 }
 


More information about the svn-src-head mailing list