[nuttcp/f20] provide fix for crash when /proc/sys/net/ipv4/tcp_adv_win_scale doesn't exist
Nikos Mavrogiannopoulos
nmav at fedoraproject.org
Fri Aug 1 12:03:33 UTC 2014
commit 2985e4dda58f073b6b567d141c07293179e91649
Author: Nikos Mavrogiannopoulos <nmav at redhat.com>
Date: Fri Aug 1 13:08:44 2014 +0200
provide fix for crash when /proc/sys/net/ipv4/tcp_adv_win_scale doesn't exist
Resolves: rhbz#887173
nuttcp-6.1.2-tcp-win-crash.patch | 14 ++++++++++++++
nuttcp.spec | 8 +++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/nuttcp-6.1.2-tcp-win-crash.patch b/nuttcp-6.1.2-tcp-win-crash.patch
new file mode 100644
index 0000000..8aa97ea
--- /dev/null
+++ b/nuttcp-6.1.2-tcp-win-crash.patch
@@ -0,0 +1,14 @@
+diff --git a/nuttcp-6.1.2.c b/nuttcp-6.1.2.c
+index dfadfc8..cd911a9 100644
+--- a/nuttcp-6.1.2.c
++++ b/nuttcp-6.1.2.c
+@@ -3750,8 +3750,8 @@ doit:
+ rcvwinval *= 2;
+ if ((adv_ws = fopen(TCP_ADV_WIN_SCALE, "r"))) {
+ fscanf(adv_ws, "%d", &winadjust);
++ fclose(adv_ws);
+ }
+- fclose(adv_ws);
+ if (winadjust < 0) {
+ sendwinavail = sendwinval >> -winadjust;
+ rcvwinavail = rcvwinval >> -winadjust;
diff --git a/nuttcp.spec b/nuttcp.spec
index 5803a8e..b60b2df 100644
--- a/nuttcp.spec
+++ b/nuttcp.spec
@@ -1,9 +1,10 @@
Name: nuttcp
Version: 6.1.2
-Release: 9%{?dist}
+Release: 10%{?dist}
Source0: ftp://ftp.lcp.nrl.navy.mil/pub/nuttcp/%{name}-%{version}.tar.bz2
Source1: %{name}@.service
Source2: %{name}.socket
+Patch1: nuttcp-6.1.2-tcp-win-crash.patch
URL: ftp://ftp.lcp.nrl.navy.mil/pub/nuttcp/
Summary: Tool for testing TCP connections
Group: Applications/Internet
@@ -29,6 +30,8 @@ CPU utilization, and loss percentage (for UDP transfers).
%prep
%setup -q
+%patch1 -p1 -b .tcp-adv-win
+
#sed -i -e "s,/usr/local/bin,%{_bindir},g;" \
# -e "s,disable\(.*\)no,disable\t\t= yes,g" xinetd.d/*
@@ -78,6 +81,9 @@ fi
%changelog
+* Fri Aug 01 2014 Nikos Mavrogiannopoulos <nmav at redhat.com> - 6.1.2-10
+- provide fix for crash when /proc/sys/net/ipv4/tcp_adv_win_scale didn't exist (#887173)
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 6.1.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list