Module Name:    src
Committed By:   christos
Date:           Thu Feb  9 17:27:30 UTC 2017

Modified Files:
        src/usr.bin/nc: netcat.c

Log Message:
the tls ifdef was a bit too aggressive.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/nc/netcat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/nc/netcat.c
diff -u src/usr.bin/nc/netcat.c:1.2 src/usr.bin/nc/netcat.c:1.3
--- src/usr.bin/nc/netcat.c:1.2	Mon Feb  6 11:03:40 2017
+++ src/usr.bin/nc/netcat.c	Thu Feb  9 12:27:30 2017
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: netcat.c,v 1.2 2017/02/06 16:03:40 christos Exp $");
+__RCSID("$NetBSD: netcat.c,v 1.3 2017/02/09 17:27:30 christos Exp $");
 
 /*
  * Re-written nc(1) for OpenBSD. Original implementation by
@@ -709,8 +709,8 @@ main(int argc, char *argv[])
 			}
 			if (Fflag)
 				fdpass(s);
-#ifdef CRYPTO
 			else {
+#ifdef CRYPTO
 				if (usetls)
 					tls_setup_client(tls_ctx, s, host);
 				if (!zflag)
@@ -725,8 +725,11 @@ main(int argc, char *argv[])
 					tls_free(tls_ctx);
 					tls_ctx = NULL;
 				}
-			}
+#else
+				if (!zflag)
+					readwrite(s, NULL);
 #endif
+			}
 		}
 	}
 

Reply via email to