summaryrefslogtreecommitdiff
path: root/pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2023-08-25 13:09:09 -0700
committerMichael Forney <mforney@mforney.org>2023-08-25 13:09:09 -0700
commit0ae82dcc8be1ff6e64186e5616419769c2adaaee (patch)
treee5a9df79c9f46c1b256a0049d52c6dc51a6cf45b /pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch
parent0cf368de53d9ddf14ba76b7d78cf172d533ee0ad (diff)
openbsd: Update to 7.3
Diffstat (limited to 'pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch')
-rw-r--r--pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch32
1 files changed, 16 insertions, 16 deletions
diff --git a/pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch b/pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch
index 2c3cb23d..64bf02ed 100644
--- a/pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch
+++ b/pkg/openbsd/patch/0027-nc-Portability-fixes-from-libressl-portable.patch
@@ -1,4 +1,4 @@
-From 074f2b35512b16c9644c8bd878fa9ace208c17a6 Mon Sep 17 00:00:00 2001
+From 6c278af8cc6a9fcb94b9bbe572b0bd3f7dd492c1 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Mon, 2 Dec 2019 21:11:04 -0800
Subject: [PATCH] nc: Portability fixes from libressl-portable
@@ -8,7 +8,7 @@ Subject: [PATCH] nc: Portability fixes from libressl-portable
1 file changed, 48 insertions(+), 7 deletions(-)
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
-index 503095584ad..f052766213e 100644
+index c8f1cdd9f75..7369ed85619 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -93,9 +93,13 @@ int zflag; /* Port Scan Flag */
@@ -25,7 +25,7 @@ index 503095584ad..f052766213e 100644
int usetls; /* use TLS */
const char *Cflag; /* Public cert file */
-@@ -269,12 +273,14 @@ main(int argc, char *argv[])
+@@ -268,12 +272,14 @@ main(int argc, char *argv[])
case 'u':
uflag = 1;
break;
@@ -40,7 +40,7 @@ index 503095584ad..f052766213e 100644
case 'v':
vflag = 1;
break;
-@@ -321,9 +327,11 @@ main(int argc, char *argv[])
+@@ -320,9 +326,11 @@ main(int argc, char *argv[])
case 'o':
oflag = optarg;
break;
@@ -52,7 +52,7 @@ index 503095584ad..f052766213e 100644
case 'T':
errstr = NULL;
errno = 0;
-@@ -347,9 +355,11 @@ main(int argc, char *argv[])
+@@ -346,9 +354,11 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
@@ -64,7 +64,7 @@ index 503095584ad..f052766213e 100644
/* Cruft to make sure options are clean, and used properly. */
if (argc == 1 && family == AF_UNIX) {
-@@ -947,7 +957,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
+@@ -927,7 +937,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
char *ipaddr)
{
struct addrinfo *res, *res0;
@@ -76,7 +76,7 @@ index 503095584ad..f052766213e 100644
if ((error = getaddrinfo(host, port, &hints, &res0)))
errx(1, "getaddrinfo for host \"%s\" port %s: %s", host,
-@@ -962,8 +975,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
+@@ -942,8 +955,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
if (sflag || pflag) {
struct addrinfo ahints, *ares;
@@ -87,7 +87,7 @@ index 503095584ad..f052766213e 100644
memset(&ahints, 0, sizeof(struct addrinfo));
ahints.ai_family = res->ai_family;
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
-@@ -1055,8 +1070,11 @@ int
+@@ -1035,8 +1050,11 @@ int
local_listen(const char *host, const char *port, struct addrinfo hints)
{
struct addrinfo *res, *res0;
@@ -100,7 +100,7 @@ index 503095584ad..f052766213e 100644
/* Allow nodename to be null. */
hints.ai_flags |= AI_PASSIVE;
-@@ -1076,9 +1094,11 @@ local_listen(const char *host, const char *port, struct addrinfo hints)
+@@ -1056,9 +1074,11 @@ local_listen(const char *host, const char *port, struct addrinfo hints)
res->ai_protocol)) == -1)
continue;
@@ -112,21 +112,21 @@ index 503095584ad..f052766213e 100644
set_common_sockopts(s, res->ai_family);
-@@ -1548,11 +1568,13 @@ set_common_sockopts(int s, int af)
+@@ -1557,11 +1577,13 @@ set_common_sockopts(int s, int af)
{
int x = 1;
+#ifdef TCP_MD5SIG
if (Sflag) {
if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG,
- &x, sizeof(x)) == -1)
+ &x, sizeof(x)) == -1)
err(1, NULL);
}
+#endif
if (Dflag) {
if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
- &x, sizeof(x)) == -1)
-@@ -1563,9 +1585,16 @@ set_common_sockopts(int s, int af)
+ &x, sizeof(x)) == -1)
+@@ -1572,9 +1594,16 @@ set_common_sockopts(int s, int af)
IP_TOS, &Tflag, sizeof(Tflag)) == -1)
err(1, "set IP ToS");
@@ -143,7 +143,7 @@ index 503095584ad..f052766213e 100644
}
if (Iflag) {
if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
-@@ -1589,13 +1618,17 @@ set_common_sockopts(int s, int af)
+@@ -1598,13 +1627,17 @@ set_common_sockopts(int s, int af)
}
if (minttl != -1) {
@@ -162,7 +162,7 @@ index 503095584ad..f052766213e 100644
}
}
-@@ -1820,14 +1853,22 @@ help(void)
+@@ -1829,14 +1862,22 @@ help(void)
\t-P proxyuser\tUsername for proxy authentication\n\
\t-p port\t Specify local port for remote connects\n\
\t-R CAfile CA bundle\n\
@@ -190,5 +190,5 @@ index 503095584ad..f052766213e 100644
\t-W recvlimit Terminate after receiving a number of packets\n\
\t-w timeout Timeout for connects and final net reads\n\
--
-2.26.2
+2.37.3