Skip to content

Commit f5a4ee5

Browse files
committed
rebase netcat patch
1 parent 4a931b5 commit f5a4ee5

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

patches/netcat.c.patch

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- apps/nc/netcat.c.orig Sun Dec 6 22:05:45 2015
2-
+++ apps/nc/netcat.c Mon Dec 7 07:52:00 2015
1+
--- apps/nc/netcat.c.orig Mon Dec 28 08:46:10 2015
2+
+++ apps/nc/netcat.c Mon Dec 28 08:46:19 2015
33
@@ -57,6 +57,10 @@
44
#include <tls.h>
55
#include "atomicio.h"
@@ -35,7 +35,7 @@
3535

3636
int usetls; /* use TLS */
3737
char *Cflag; /* Public cert file */
38-
@@ -144,7 +154,7 @@
38+
@@ -150,7 +160,7 @@
3939
struct servent *sv;
4040
socklen_t len;
4141
struct sockaddr_storage cliaddr;
@@ -44,7 +44,7 @@
4444
const char *errstr, *proxyhost = "", *proxyport = NULL;
4545
struct addrinfo proxyhints;
4646
char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE];
47-
@@ -245,12 +255,14 @@
47+
@@ -251,12 +261,14 @@
4848
case 'u':
4949
uflag = 1;
5050
break;
@@ -59,7 +59,7 @@
5959
case 'v':
6060
vflag = 1;
6161
break;
62-
@@ -283,9 +295,11 @@
62+
@@ -289,9 +301,11 @@
6363
errx(1, "TCP send window %s: %s",
6464
errstr, optarg);
6565
break;
@@ -71,7 +71,7 @@
7171
case 'T':
7272
errstr = NULL;
7373
errno = 0;
74-
@@ -309,9 +323,11 @@
74+
@@ -315,9 +329,11 @@
7575
argc -= optind;
7676
argv += optind;
7777

@@ -83,7 +83,7 @@
8383

8484
if (family == AF_UNIX) {
8585
if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
86-
@@ -444,7 +460,10 @@
86+
@@ -460,7 +476,10 @@
8787
errx(1, "-H and -T noverify may not be used"
8888
"together");
8989
tls_config_insecure_noverifycert(tls_cfg);
@@ -95,7 +95,7 @@
9595
}
9696
if (lflag) {
9797
struct tls *tls_cctx = NULL;
98-
@@ -791,7 +810,10 @@
98+
@@ -807,7 +826,10 @@
9999
remote_connect(const char *host, const char *port, struct addrinfo hints)
100100
{
101101
struct addrinfo *res, *res0;
@@ -107,7 +107,7 @@
107107

108108
if ((error = getaddrinfo(host, port, &hints, &res)))
109109
errx(1, "getaddrinfo: %s", gai_strerror(error));
110-
@@ -806,8 +828,10 @@
110+
@@ -822,8 +844,10 @@
111111
if (sflag || pflag) {
112112
struct addrinfo ahints, *ares;
113113

@@ -118,7 +118,7 @@
118118
memset(&ahints, 0, sizeof(struct addrinfo));
119119
ahints.ai_family = res0->ai_family;
120120
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
121-
@@ -876,7 +900,10 @@
121+
@@ -892,7 +916,10 @@
122122
local_listen(char *host, char *port, struct addrinfo hints)
123123
{
124124
struct addrinfo *res, *res0;
@@ -130,7 +130,7 @@
130130
int error;
131131

132132
/* Allow nodename to be null. */
133-
@@ -898,9 +925,11 @@
133+
@@ -914,9 +941,11 @@
134134
res0->ai_protocol)) < 0)
135135
continue;
136136

@@ -142,7 +142,7 @@
142142

143143
set_common_sockopts(s, res0->ai_family);
144144

145-
@@ -1340,11 +1369,13 @@
145+
@@ -1356,11 +1385,13 @@
146146
{
147147
int x = 1;
148148

@@ -156,7 +156,7 @@
156156
if (Dflag) {
157157
if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
158158
&x, sizeof(x)) == -1)
159-
@@ -1519,14 +1550,22 @@
159+
@@ -1538,14 +1569,22 @@
160160
\t-P proxyuser\tUsername for proxy authentication\n\
161161
\t-p port\t Specify local port for remote connects\n\
162162
\t-R CAfile CA bundle\n\

0 commit comments

Comments
 (0)