svn commit: r347647 - stable/11/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Thu May 16 08:15:55 UTC 2019
Author: tuexen
Date: Thu May 16 08:15:54 2019
New Revision: 347647
URL: https://svnweb.freebsd.org/changeset/base/347647
Log:
MFC r339022:
Increment the corresponding UDP stats counter (udps_opackets) when
sending UDP encapsulated SCTP packets.
This is consistent with the behaviour that when such packets are received,
the corresponding UDP stats counter (udps_ipackets) is incremented.
Thanks to Peter Lei for making me aware of this inconsistency.
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 Thu May 16 05:29:54 2019 (r347646)
+++ stable/11/sys/netinet/sctp_output.c Thu May 16 08:15:54 2019 (r347647)
@@ -4259,6 +4259,9 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
atomic_subtract_int(&stcb->asoc.refcnt, 1);
}
#endif
+ if (port) {
+ UDPSTAT_INC(udps_opackets);
+ }
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
if (ret)
@@ -4598,6 +4601,9 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
sin6->sin6_port = prev_port;
}
SCTPDBG(SCTP_DEBUG_OUTPUT3, "return from send is %d\n", ret);
+ if (port) {
+ UDPSTAT_INC(udps_opackets);
+ }
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
if (ret) {
@@ -11284,6 +11290,9 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockad
return;
}
SCTPDBG(SCTP_DEBUG_OUTPUT3, "return from send is %d\n", ret);
+ if (port) {
+ UDPSTAT_INC(udps_opackets);
+ }
SCTP_STAT_INCR(sctps_sendpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outpackets);
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
More information about the svn-src-stable-11
mailing list