rpms/nc/devel nc-1.84-efficient_reads.patch, NONE, 1.1 nc.spec, 1.42, 1.43
Jan Zeleny
jzeleny at fedoraproject.org
Fri Apr 3 14:42:30 UTC 2009
Author: jzeleny
Update of /cvs/extras/rpms/nc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29730
Modified Files:
nc.spec
Added Files:
nc-1.84-efficient_reads.patch
Log Message:
Uploaded patch to make network reads more efficient (#493129)
nc-1.84-efficient_reads.patch:
--- NEW FILE nc-1.84-efficient_reads.patch ---
diff -ur nc.orig/netcat.c nc/netcat.c
--- nc.orig/netcat.c 2009-03-31 13:41:12.000000000 -0400
+++ nc/netcat.c 2009-03-31 14:05:50.000000000 -0400
@@ -316,10 +316,10 @@
*/
if (uflag) {
int rv, plen;
- char buf[8192];
+ char buf[16384];
len = sizeof(cliaddr);
- plen = jflag ? 8192 : 1024;
+ plen = jflag ? 16384 : 2048;
rv = recvfrom(s, buf, plen, MSG_PEEK,
(struct sockaddr *)&cliaddr, &len);
if (rv < 0)
@@ -690,12 +690,12 @@
readwrite(int nfd)
{
struct pollfd pfd[2];
- unsigned char buf[8192];
+ unsigned char buf[16384];
int n, wfd = fileno(stdin);
int lfd = fileno(stdout);
int plen;
- plen = jflag ? 8192 : 1024;
+ plen = jflag ? 16384 : 2048;
/* Setup Network FD */
pfd[0].fd = nfd;
Index: nc.spec
===================================================================
RCS file: /cvs/extras/rpms/nc/devel/nc.spec,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- nc.spec 27 Feb 2009 14:52:14 -0000 1.42
+++ nc.spec 3 Apr 2009 14:42:00 -0000 1.43
@@ -1,7 +1,7 @@
Summary: Reads and writes data across network connections using TCP or UDP
Name: nc
Version: 1.84
-Release: 18%{?dist}
+Release: 19%{?dist}
URL: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/
# source is CVS checkout
Source0: nc-%{version}.tar.bz2
@@ -16,6 +16,7 @@
Patch8: nc-1.84-verb.patch
Patch9: nc-1.84-man.patch
Patch10: nc-1.84-gcc4.3.patch
+Patch11: nc-1.84-efficient_reads.patch
License: GPL+
Group: Applications/Internet
@@ -49,6 +50,7 @@
%patch8 -p1 -b .verb
%patch9 -p1 -b .man
%patch10 -p1 -b .gcc
+%patch11 -p1 -b .reads
%build
gcc $RPM_OPT_FLAGS -Werror -fno-strict-aliasing `pkg-config --cflags --libs glib-2.0` netcat.c atomicio.c socks.c -o nc
@@ -70,6 +72,9 @@
%doc README scripts
%changelog
+* Fri Apr 03 2009 Jan Zeleny <jzeleny at redhat.com> - 1.84-19
+- updated network reading to be more efficient (#493129)
+
* Fri Feb 27 2009 Jan Safranek <jsafrane at redhat.com> - 1.84-18
- fixed compilation with GCC 4.4
More information about the fedora-extras-commits
mailing list