From 3061c85ca527d6db256c6d9968ce8d323e86978a Mon Sep 17 00:00:00 2001 From: lifeifei Date: Thu, 1 Aug 2024 15:40:13 +0800 Subject: [PATCH] backport fix in sctp_process_event and send_sctp_stream --- ...p_process_event-and-send_sctp_stream.patch | 21 +++++++++++++++++++ netperf.spec | 8 +++++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 backport-fix-in-sctp_process_event-and-send_sctp_stream.patch diff --git a/backport-fix-in-sctp_process_event-and-send_sctp_stream.patch b/backport-fix-in-sctp_process_event-and-send_sctp_stream.patch new file mode 100644 index 0000000..cd3fa5f --- /dev/null +++ b/backport-fix-in-sctp_process_event-and-send_sctp_stream.patch @@ -0,0 +1,21 @@ +diff -apurN src/nettest_sctp.c src-new/nettest_sctp.c +--- src/nettest_sctp.c 2024-08-01 15:30:18.125049523 +0800 ++++ src-new/nettest_sctp.c 2024-08-01 15:30:36.191157597 +0800 +@@ -234,7 +234,7 @@ sctp_process_event( int socket, void *bu + fflush(where); + } + sac = &snp->sn_assoc_change; +- switch (sac->sac_type) { ++ switch (sac->sac_state) { + case SCTP_COMM_UP: + if (debug) { + fprintf(where, " SCTP_COMM_UP\n"); +@@ -547,7 +547,7 @@ Size (bytes)\n\ + sctp_stream_request->dirty_count = rem_dirty_count; + sctp_stream_request->clean_count = rem_clean_count; + #endif /* DIRTY */ +- sctp_stream_request->port = htonl(atoi(remote_data_port)); ++ sctp_stream_request->port = atoi(remote_data_port); + sctp_stream_request->ipfamily = af_to_nf(remote_res->ai_family); + sctp_stream_request->non_blocking = non_block; + diff --git a/netperf.spec b/netperf.spec index 2690375..1210fb8 100644 --- a/netperf.spec +++ b/netperf.spec @@ -2,7 +2,7 @@ Name: netperf Version: 2.7.0 -Release: 7 +Release: 8 Summary: A Performance benchmark testing tool fro TCP/UDP License: MIT URL: http://github.com/HewlettPackard/netperf @@ -10,7 +10,7 @@ Source0: https://github.com/HewlettPackard/netperf/archive/%{name}-%{_version}.t Patch1: netperf-fix-multiple-definition.patch Patch2: netserver-suppress-debug-log-by-default.patch - +Patch3: backport-fix-in-sctp_process_event-and-send_sctp_stream.patch BuildRequires: gcc texinfo texinfo-tex %description @@ -22,6 +22,7 @@ netperf is a collection of many different network performance benchmarking tool %setup -q -n %{name}-%{name}-%{version} %patch1 %patch2 +%patch3 %build %configure @@ -55,6 +56,9 @@ netperf is a collection of many different network performance benchmarking tool %{_mandir}/man1/* %changelog +* Mon Jul 29 2024 lifeifei - 2.7.0-8 +- Migration patch from upstream:sctp fix in sctp_process_event and send_sctp_stream. + * Thu Apr 18 2024 baiguo - 2.7.0-7 - netserver: suppress debug log by default -- Gitee