[nc] 1.103 patch
Petr Sabata
psabata at fedoraproject.org
Wed Oct 5 13:33:18 UTC 2011
commit 933a36956ecde0ba279b0a4131ffeb9c3937b0c0
Author: Petr Sabata <contyk at redhat.com>
Date: Wed Oct 5 15:31:02 2011 +0200
1.103 patch
.gitignore | 1 +
nc-1.101-crlf.patch => nc-1.103-crlf.patch | 68 +++++++++++++++-------------
nc-1.103-iptos-class.patch | 27 +++++++++++
nc.spec | 14 ++++--
sources | 2 +-
5 files changed, 75 insertions(+), 37 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bb88438..b2de8e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
nc-1.84.tar.bz2
/nc-1.100.tar.bz2
/nc-1.101.tar.bz2
+/nc-1.103.tar.bz2
diff --git a/nc-1.101-crlf.patch b/nc-1.103-crlf.patch
similarity index 72%
rename from nc-1.101-crlf.patch
rename to nc-1.103-crlf.patch
index e92f054..78d4115 100644
--- a/nc-1.101-crlf.patch
+++ b/nc-1.103-crlf.patch
@@ -1,14 +1,38 @@
---- nc/netcat.c 2011-03-08 15:31:25.910563002 +0100
-+++ nc/netcat.c.new 2011-03-08 15:37:48.252563204 +0100
-@@ -86,6 +86,7 @@
+diff --git a/nc.1 b/nc.1
+index 61d6012..39d7715 100644
+--- a/nc.1
++++ b/nc.1
+@@ -34,7 +34,7 @@
+ .Sh SYNOPSIS
+ .Nm nc
+ .Bk -words
+-.Op Fl 46DdhklnrStUuvz
++.Op Fl 46CDdhklnrStUuvz
+ .Op Fl I Ar length
+ .Op Fl i Ar interval
+ .Op Fl O Ar length
+@@ -98,6 +98,8 @@ to use IPv4 addresses only.
+ Forces
+ .Nm
+ to use IPv6 addresses only.
++.It Fl C
++Send CRLF as line-ending.
+ .It Fl D
+ Enable debugging on the socket.
+ .It Fl d
+diff --git a/netcat.c b/netcat.c
+index 856afbc..5c8c878 100644
+--- a/netcat.c
++++ b/netcat.c
+@@ -86,6 +86,7 @@ int Iflag; /* TCP receive buffer size */
int Oflag; /* TCP send buffer size */
int Sflag; /* TCP MD5 signature option */
int Tflag = -1; /* IP Type of Service */
-+int Cflag = 0; /* CRLF line-ending */
++int Cflag = 0; /* CRLF line-ending */
int timeout = -1;
int family = AF_UNSPEC;
-@@ -130,7 +131,7 @@
+@@ -131,7 +132,7 @@ main(int argc, char *argv[])
sv = NULL;
while ((ch = getopt(argc, argv,
@@ -17,9 +41,9 @@
switch (ch) {
case '4':
family = AF_INET;
-@@ -227,6 +228,9 @@
- case 'T':
- Tflag = parse_iptos(optarg);
+@@ -239,6 +240,9 @@ main(int argc, char *argv[])
+ if (Tflag < 0 || Tflag > 255 || errstr || errno)
+ errx(1, "illegal tos value %s", optarg);
break;
+ case 'C':
+ Cflag = 1;
@@ -27,7 +51,7 @@
default:
usage(1);
}
-@@ -696,8 +700,15 @@
+@@ -747,8 +751,15 @@ readwrite(int nfd)
else if (n == 0) {
goto shutdown_wr;
} else {
@@ -45,15 +69,15 @@
}
}
else if (pfd[1].revents & POLLHUP) {
-@@ -902,6 +913,7 @@
+@@ -995,6 +1006,7 @@ help(void)
\t-S Enable the TCP MD5 signature option\n\
\t-s addr\t Local source address\n\
- \t-T ToS\t Set IP Type of Service\n\
+ \t-T toskeyword\tSet IP Type of Service\n\
+ \t-C Send CRLF as line-ending\n\
\t-t Answer TELNET negotiation\n\
\t-U Use UNIX domain socket\n\
\t-u UDP mode\n\
-@@ -919,7 +931,7 @@
+@@ -1012,7 +1024,7 @@ void
usage(int ret)
{
fprintf(stderr,
@@ -62,23 +86,3 @@
"\t [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n"
"\t [-V rtable] [-w timeout] [-X proxy_protocol]\n"
"\t [-x proxy_address[:port]] [destination] [port]\n");
---- nc/nc.1 2011-01-09 23:16:46.000000000 +0100
-+++ nc/nc.1.new 2011-03-08 15:39:03.834566792 +0100
-@@ -34,7 +34,7 @@
- .Sh SYNOPSIS
- .Nm nc
- .Bk -words
--.Op Fl 46DdhklnrStUuvz
-+.Op Fl 46CDdhklnrStUuvz
- .Op Fl I Ar length
- .Op Fl i Ar interval
- .Op Fl O Ar length
-@@ -98,6 +98,8 @@
- Forces
- .Nm
- to use IPv6 addresses only.
-+.It Fl C
-+Send CRLF as line-ending.
- .It Fl D
- Enable debugging on the socket.
- .It Fl d
diff --git a/nc-1.103-iptos-class.patch b/nc-1.103-iptos-class.patch
new file mode 100644
index 0000000..7dda1a7
--- /dev/null
+++ b/nc-1.103-iptos-class.patch
@@ -0,0 +1,27 @@
+diff --git a/netcat.c b/netcat.c
+index 5c8c878..0f6ae3d 100644
+--- a/netcat.c
++++ b/netcat.c
+@@ -957,14 +957,14 @@ map_tos(char *s, int *val)
+ { "af42", IPTOS_DSCP_AF42 },
+ { "af43", IPTOS_DSCP_AF43 },
+ { "critical", IPTOS_PREC_CRITIC_ECP },
+- { "cs0", IPTOS_DSCP_CS0 },
+- { "cs1", IPTOS_DSCP_CS1 },
+- { "cs2", IPTOS_DSCP_CS2 },
+- { "cs3", IPTOS_DSCP_CS3 },
+- { "cs4", IPTOS_DSCP_CS4 },
+- { "cs5", IPTOS_DSCP_CS5 },
+- { "cs6", IPTOS_DSCP_CS6 },
+- { "cs7", IPTOS_DSCP_CS7 },
++ { "cs0", IPTOS_CLASS_CS0 },
++ { "cs1", IPTOS_CLASS_CS1 },
++ { "cs2", IPTOS_CLASS_CS2 },
++ { "cs3", IPTOS_CLASS_CS3 },
++ { "cs4", IPTOS_CLASS_CS4 },
++ { "cs5", IPTOS_CLASS_CS5 },
++ { "cs6", IPTOS_CLASS_CS6 },
++ { "cs7", IPTOS_CLASS_CS7 },
+ { "ef", IPTOS_DSCP_EF },
+ { "inetcontrol", IPTOS_PREC_INTERNETCONTROL },
+ { "lowdelay", IPTOS_LOWDELAY },
diff --git a/nc.spec b/nc.spec
index e09315f..04a07b8 100644
--- a/nc.spec
+++ b/nc.spec
@@ -1,23 +1,25 @@
Summary: Reads and writes data across network connections using TCP or UDP
Name: nc
-Version: 1.101
-Release: 2%{?dist}
+Version: 1.103
+Release: 1%{?dist}
URL: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/
License: BSD ISC
Group: Applications/Internet
-# source is CVS checkout
+# source is CVS checkout, e.g.:
+# CVSROOT=anoncvs at anoncvs.openbsd.org.ar:/cvs/src/usr.bin cvs checkout nc
Source0: nc-%{version}.tar.bz2
Source1: b64_ntop.c
Patch0: nc-1.101-linux-ify.patch
Patch1: nc-1.100-pollhup.patch
Patch2: nc-1.100-udp-stop.patch
Patch3: nc-1.100-udp-portscan.patch
-Patch4: nc-1.101-crlf.patch
+Patch4: nc-1.103-crlf.patch
Patch5: nc-1.100-comma.patch
Patch6: nc-1.100-libbsd.patch
Patch7: nc-1.100-format-size_t.patch
Patch8: nc-1.100-initialize-range.patch
Patch9: nc-1.100-check-accept.patch
+Patch10: nc-1.103-iptos-class.patch
BuildRequires: libbsd-devel
@@ -46,6 +48,7 @@ capabilities.
%patch7 -p1 -b .format-size_t
%patch8 -p1 -b .initialize-range
%patch9 -p1 -b .check-accept
+%patch10 -p1 -b .iptos-class
cp -p %{SOURCE1} .
%build
@@ -62,6 +65,9 @@ install -m 644 nc.1 %{buildroot}%{_mandir}/man1
%{_mandir}/man1/nc.1*
%changelog
+* Wed Oct 05 2011 Petr Sabata <contyk at redhat.com> - 1.103-1
+- 1.103 bump
+
* Thu Jul 07 2011 Petr Sabata <contyk at redhat.com> - 1.101-2
- Do not send CRLF line endings in an extra packet
Thanks to Jaroslav Franek, rhbz#719386
diff --git a/sources b/sources
index bc18e9f..4634fd0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c753c0468f9b35640f05849852be8f3b nc-1.101.tar.bz2
+426d0ba70c3d2a92ece2ebbdaf082278 nc-1.103.tar.bz2
More information about the scm-commits
mailing list