diff options
Diffstat (limited to 'patches/netcat.c.patch')
-rw-r--r-- | patches/netcat.c.patch | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch index 319aca6..345a170 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | --- apps/nc/netcat.c.orig Sat Aug 17 03:21:05 2024 | 1 | --- apps/nc/netcat.c.orig Fri Jun 27 12:39:21 2025 |
2 | +++ apps/nc/netcat.c Sat Aug 17 03:28:50 2024 | 2 | +++ apps/nc/netcat.c Fri Jun 27 12:39:29 2025 |
3 | @@ -93,9 +93,13 @@ int zflag; /* Port Scan Flag */ | 3 | @@ -93,9 +93,13 @@ int zflag; /* Port Scan Flag */ |
4 | int Dflag; /* sodebug */ | 4 | int Dflag; /* sodebug */ |
5 | int Iflag; /* TCP receive buffer size */ | 5 | int Iflag; /* TCP receive buffer size */ |
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | int usetls; /* use TLS */ | 15 | int usetls; /* use TLS */ |
16 | const char *Cflag; /* Public cert file */ | 16 | const char *Cflag; /* Public cert file */ |
17 | @@ -268,12 +272,14 @@ main(int argc, char *argv[]) | 17 | @@ -271,12 +275,14 @@ main(int argc, char *argv[]) |
18 | case 'u': | 18 | case 'u': |
19 | uflag = 1; | 19 | uflag = 1; |
20 | break; | 20 | break; |
@@ -29,7 +29,7 @@ | |||
29 | case 'v': | 29 | case 'v': |
30 | vflag = 1; | 30 | vflag = 1; |
31 | break; | 31 | break; |
32 | @@ -320,9 +326,11 @@ main(int argc, char *argv[]) | 32 | @@ -323,9 +329,11 @@ main(int argc, char *argv[]) |
33 | case 'o': | 33 | case 'o': |
34 | oflag = optarg; | 34 | oflag = optarg; |
35 | break; | 35 | break; |
@@ -41,7 +41,7 @@ | |||
41 | case 'T': | 41 | case 'T': |
42 | errstr = NULL; | 42 | errstr = NULL; |
43 | errno = 0; | 43 | errno = 0; |
44 | @@ -346,9 +354,11 @@ main(int argc, char *argv[]) | 44 | @@ -349,9 +357,11 @@ main(int argc, char *argv[]) |
45 | argc -= optind; | 45 | argc -= optind; |
46 | argv += optind; | 46 | argv += optind; |
47 | 47 | ||
@@ -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 | @@ -923,7 +933,10 @@ remote_connect(const char *host, const char *port, str | 56 | @@ -928,7 +938,10 @@ remote_connect(const char *host, const char *port, str |
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 | @@ -938,8 +951,10 @@ remote_connect(const char *host, const char *port, str | 68 | @@ -943,8 +956,10 @@ remote_connect(const char *host, const char *port, str |
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 | @@ -1031,7 +1046,10 @@ int | 79 | @@ -1036,7 +1051,10 @@ int |
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 | @@ -1052,9 +1070,11 @@ local_listen(const char *host, const char *port, struc | 91 | @@ -1057,9 +1075,11 @@ local_listen(const char *host, const char *port, struc |
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 | @@ -1559,11 +1579,13 @@ set_common_sockopts(int s, int af) | 103 | @@ -1564,11 +1584,13 @@ set_common_sockopts(int s, int af) |
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 | @@ -1574,9 +1596,16 @@ set_common_sockopts(int s, int af) | 117 | @@ -1579,9 +1601,16 @@ set_common_sockopts(int s, int af) |
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 | @@ -1600,13 +1629,17 @@ set_common_sockopts(int s, int af) | 134 | @@ -1605,13 +1634,17 @@ set_common_sockopts(int s, int af) |
135 | } | 135 | } |
136 | 136 | ||
137 | if (minttl != -1) { | 137 | if (minttl != -1) { |
@@ -150,7 +150,7 @@ | |||
150 | } | 150 | } |
151 | } | 151 | } |
152 | 152 | ||
153 | @@ -1831,15 +1864,19 @@ help(void) | 153 | @@ -1841,15 +1874,19 @@ help(void) |
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\ |
@@ -175,4 +175,4 @@ | |||
175 | + "\t-v Verbose\n\ | 175 | + "\t-v Verbose\n\ |
176 | \t-W recvlimit Terminate after receiving a number of packets\n\ | 176 | \t-W recvlimit Terminate after receiving a number of packets\n\ |
177 | \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\ | 178 | \t-X proto Proxy protocol: \"4\", \"4A\", \"5\" (SOCKS) or \"connect\"\n\ |