From 11bb39ecf6e58a5e44fc8043004b3f455f30b8fe Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 7 Nov 2018 20:00:29 -0600 Subject: Rediffed patches for merge fuzz --- patches/netcat.c.patch | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'patches/netcat.c.patch') diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch index 2965ea7..07205ec 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch @@ -1,5 +1,5 @@ ---- apps/nc/netcat.c.orig Mon Jul 17 06:06:51 2017 -+++ apps/nc/netcat.c Mon Jul 17 06:11:24 2017 +--- apps/nc/netcat.c.orig 2018-11-07 17:01:38.000000000 -0600 ++++ apps/nc/netcat.c 2018-11-07 17:37:57.000000000 -0600 @@ -92,9 +92,13 @@ int Dflag; /* sodebug */ int Iflag; /* TCP receive buffer size */ @@ -11,7 +11,7 @@ +#ifdef SO_RTABLE int rtableid = -1; +#endif - + int usetls; /* use TLS */ char *Cflag; /* Public cert file */ @@ -266,12 +270,14 @@ @@ -44,13 +44,13 @@ @@ -344,9 +352,11 @@ argc -= optind; argv += optind; - + +#ifdef SO_RTABLE if (rtableid >= 0) if (setrtable(rtableid) == -1) err(1, "setrtable"); +#endif - + /* Cruft to make sure options are clean, and used properly. */ if (argv[0] && !argv[1] && family == AF_UNIX) { @@ -909,7 +919,10 @@ @@ -62,13 +62,13 @@ +#ifdef SO_BINDANY + int on = 1; +#endif - + if ((error = getaddrinfo(host, port, &hints, &res0))) errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, @@ -924,8 +937,10 @@ if (sflag || pflag) { struct addrinfo ahints, *ares; - + +#ifdef SO_BINDANY /* try SO_BINDANY, but don't insist */ setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); @@ -86,24 +86,24 @@ + int ret, x = 1; +#endif int error; - + /* Allow nodename to be null. */ @@ -1017,9 +1035,11 @@ res->ai_protocol)) < 0) continue; - + +#ifdef SO_REUSEPORT ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) err(1, NULL); +#endif - + set_common_sockopts(s, res->ai_family); - + @@ -1475,11 +1495,13 @@ { int x = 1; - + +#ifdef TCP_MD5SIG if (Sflag) { if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG, @@ -117,7 +117,7 @@ @@ -1490,9 +1512,16 @@ IP_TOS, &Tflag, sizeof(Tflag)) == -1) err(1, "set IP ToS"); - + +#ifdef IPV6_TCLASS else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1) @@ -133,14 +133,14 @@ if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, @@ -1516,13 +1545,17 @@ } - + if (minttl != -1) { +#ifdef IP_MINTTL if (af == AF_INET && setsockopt(s, IPPROTO_IP, IP_MINTTL, &minttl, sizeof(minttl))) err(1, "set IP min TTL"); +#endif - + - else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, +#ifdef IPV6_MINHOPCOUNT + if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, @@ -149,7 +149,7 @@ +#endif } } - + @@ -1748,14 +1781,22 @@ \t-P proxyuser\tUsername for proxy authentication\n\ \t-p port\t Specify local port for remote connects\n\ -- cgit v1.2.3-55-g6feb