aboutsummaryrefslogtreecommitdiff
path: root/patches/netcat.c.patch
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2020-02-15 11:32:11 -0600
committerBrent Cook <busterb@gmail.com>2020-02-15 11:32:11 -0600
commit14dd93c37a2a38dee7b8d2e0b823b0e0cc21e8d4 (patch)
tree1771e8d5243dc8d8662fe0676ed9847fb20cbcc5 /patches/netcat.c.patch
parent7f3bfc89224d5868675e101d7fb32baa806f84d8 (diff)
downloadportable-14dd93c37a2a38dee7b8d2e0b823b0e0cc21e8d4.tar.gz
portable-14dd93c37a2a38dee7b8d2e0b823b0e0cc21e8d4.tar.bz2
portable-14dd93c37a2a38dee7b8d2e0b823b0e0cc21e8d4.zip
rebase patches
Diffstat (limited to 'patches/netcat.c.patch')
-rw-r--r--patches/netcat.c.patch35
1 files changed, 17 insertions, 18 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch
index f32623c..7d82aca 100644
--- a/patches/netcat.c.patch
+++ b/patches/netcat.c.patch
@@ -1,5 +1,5 @@
1--- apps/nc/netcat.c.orig Mon Nov 18 01:13:56 2019 1--- apps/nc/netcat.c.orig Sat Feb 15 11:04:42 2020
2+++ apps/nc/netcat.c Sat Nov 30 03:29:50 2019 2+++ apps/nc/netcat.c Sat Feb 15 11:24:38 2020
3@@ -93,9 +93,13 @@ 3@@ -93,9 +93,13 @@
4 int Dflag; /* sodebug */ 4 int Dflag; /* sodebug */
5 int Iflag; /* TCP receive buffer size */ 5 int Iflag; /* TCP receive buffer size */
@@ -53,7 +53,7 @@
53 53
54 /* Cruft to make sure options are clean, and used properly. */ 54 /* Cruft to make sure options are clean, and used properly. */
55 if (argc == 1 && family == AF_UNIX) { 55 if (argc == 1 && family == AF_UNIX) {
56@@ -926,7 +936,10 @@ 56@@ -947,7 +957,10 @@
57 char *ipaddr) 57 char *ipaddr)
58 { 58 {
59 struct addrinfo *res, *res0; 59 struct addrinfo *res, *res0;
@@ -65,7 +65,7 @@
65 65
66 if ((error = getaddrinfo(host, port, &hints, &res0))) 66 if ((error = getaddrinfo(host, port, &hints, &res0)))
67 errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, 67 errx(1, "getaddrinfo for host \"%s\" port %s: %s", host,
68@@ -941,8 +954,10 @@ 68@@ -962,8 +975,10 @@
69 if (sflag || pflag) { 69 if (sflag || pflag) {
70 struct addrinfo ahints, *ares; 70 struct addrinfo ahints, *ares;
71 71
@@ -76,7 +76,7 @@
76 memset(&ahints, 0, sizeof(struct addrinfo)); 76 memset(&ahints, 0, sizeof(struct addrinfo));
77 ahints.ai_family = res->ai_family; 77 ahints.ai_family = res->ai_family;
78 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; 78 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
79@@ -1034,7 +1049,10 @@ 79@@ -1055,7 +1070,10 @@
80 local_listen(const char *host, const char *port, struct addrinfo hints) 80 local_listen(const char *host, const char *port, struct addrinfo hints)
81 { 81 {
82 struct addrinfo *res, *res0; 82 struct addrinfo *res, *res0;
@@ -88,7 +88,7 @@
88 int error; 88 int error;
89 89
90 /* Allow nodename to be null. */ 90 /* Allow nodename to be null. */
91@@ -1055,9 +1073,11 @@ 91@@ -1076,9 +1094,11 @@
92 res->ai_protocol)) == -1) 92 res->ai_protocol)) == -1)
93 continue; 93 continue;
94 94
@@ -100,7 +100,7 @@
100 100
101 set_common_sockopts(s, res->ai_family); 101 set_common_sockopts(s, res->ai_family);
102 102
103@@ -1555,11 +1575,13 @@ 103@@ -1548,11 +1568,13 @@
104 { 104 {
105 int x = 1; 105 int x = 1;
106 106
@@ -114,7 +114,7 @@
114 if (Dflag) { 114 if (Dflag) {
115 if (setsockopt(s, SOL_SOCKET, SO_DEBUG, 115 if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
116 &x, sizeof(x)) == -1) 116 &x, sizeof(x)) == -1)
117@@ -1570,9 +1592,16 @@ 117@@ -1563,9 +1585,16 @@
118 IP_TOS, &Tflag, sizeof(Tflag)) == -1) 118 IP_TOS, &Tflag, sizeof(Tflag)) == -1)
119 err(1, "set IP ToS"); 119 err(1, "set IP ToS");
120 120
@@ -131,7 +131,7 @@
131 } 131 }
132 if (Iflag) { 132 if (Iflag) {
133 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, 133 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
134@@ -1596,13 +1625,17 @@ 134@@ -1589,13 +1618,17 @@
135 } 135 }
136 136
137 if (minttl != -1) { 137 if (minttl != -1) {
@@ -150,30 +150,29 @@
150 } 150 }
151 } 151 }
152 152
153@@ -1824,14 +1857,22 @@ 153@@ -1820,15 +1853,19 @@
154 \t-P proxyuser\tUsername for proxy authentication\n\ 154 \t-P proxyuser\tUsername for proxy authentication\n\
155 \t-p port\t Specify local port for remote connects\n\ 155 \t-p port\t Specify local port for remote connects\n\
156 \t-R CAfile CA bundle\n\ 156 \t-R CAfile CA bundle\n\
157- \t-r Randomize remote ports\n\ 157- \t-r Randomize remote ports\n\
158- \t-S Enable the TCP MD5 signature option\n\ 158- \t-S Enable the TCP MD5 signature option\n\
159- \t-s sourceaddr Local source address\n\
159+ \t-r Randomize remote ports\n" 160+ \t-r Randomize remote ports\n"
160+#ifdef TCP_MD5SIG 161+#ifdef TCP_MD5SIG
161+ "\ 162+ "\t-S Enable the TCP MD5 signature option\n"
162+ \t-S Enable the TCP MD5 signature option\n"
163+#endif 163+#endif
164+ "\ 164+ "\t-s sourceaddr Local source address\n\
165 \t-s source Local source address\n\
166 \t-T keyword TOS value or TLS options\n\ 165 \t-T keyword TOS value or TLS options\n\
167 \t-t Answer TELNET negotiation\n\ 166 \t-t Answer TELNET negotiation\n\
168 \t-U Use UNIX domain socket\n\ 167 \t-U Use UNIX domain socket\n\
169- \t-u UDP mode\n\ 168- \t-u UDP mode\n\
170- \t-V rtable Specify alternate routing table\n\ 169- \t-V rtable Specify alternate routing table\n\
170- \t-v Verbose\n\
171+ \t-u UDP mode\n" 171+ \t-u UDP mode\n"
172+#ifdef SO_RTABLE 172+#ifdef SO_RTABLE
173+ "\ 173+ "\t-V rtable Specify alternate routing table\n"
174+ \t-V rtable Specify alternate routing table\n"
175+#endif 174+#endif
176+ "\ 175+ "\t-v Verbose\n\
177 \t-v Verbose\n\
178 \t-W recvlimit Terminate after receiving a number of packets\n\ 176 \t-W recvlimit Terminate after receiving a number of packets\n\
179 \t-w timeout Timeout for connects and final net reads\n\ 177 \t-w timeout Timeout for connects and final net reads\n\
178 \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\