CVS commit: src/usr.bin/nc

2023-06-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jun 20 08:51:24 UTC 2023

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

Log Message:
nc(1): Declare and initialize ``on'' ifdef SO_BINDANY. NFC yet for us.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.



CVS commit: src/usr.bin/nc

2023-06-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jun 20 08:51:24 UTC 2023

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

Log Message:
nc(1): Declare and initialize ``on'' ifdef SO_BINDANY. NFC yet for us.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/usr.bin/nc/netcat.c:1.7
--- src/usr.bin/nc/netcat.c:1.6	Thu Oct  3 01:15:19 2019
+++ src/usr.bin/nc/netcat.c	Tue Jun 20 08:51:24 2023
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: netcat.c,v 1.6 2019/10/03 01:15:19 sevan Exp $");
+__RCSID("$NetBSD: netcat.c,v 1.7 2023/06/20 08:51:24 rin Exp $");
 
 /*
  * Re-written nc(1) for OpenBSD. Original implementation by
@@ -915,6 +915,9 @@ remote_connect(const char *host, const c
 {
 	struct addrinfo *res, *res0;
 	int s = -1, error, save_errno;
+#ifdef SO_BINDANY
+	int on = 1;
+#endif
 
 	if ((error = getaddrinfo(host, port, , )))
 		errx(1, "getaddrinfo: %s", gai_strerror(error));



CVS commit: src/usr.bin/nc

2019-10-02 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Oct  3 01:15:19 UTC 2019

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

Log Message:
Skip options which rely on crypto support in getopt() argument list, if we're
not building with cryto support.

via JP  on tech-misc@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 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.



CVS commit: src/usr.bin/nc

2019-10-02 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Oct  3 01:15:19 UTC 2019

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

Log Message:
Skip options which rely on crypto support in getopt() argument list, if we're
not building with cryto support.

via JP  on tech-misc@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 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.5 src/usr.bin/nc/netcat.c:1.6
--- src/usr.bin/nc/netcat.c:1.5	Thu Feb  9 21:23:48 2017
+++ src/usr.bin/nc/netcat.c	Thu Oct  3 01:15:19 2019
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: netcat.c,v 1.5 2017/02/09 21:23:48 christos Exp $");
+__RCSID("$NetBSD: netcat.c,v 1.6 2019/10/03 01:15:19 sevan Exp $");
 
 /*
  * Re-written nc(1) for OpenBSD. Original implementation by
@@ -180,7 +180,12 @@ main(int argc, char *argv[])
 	signal(SIGPIPE, SIG_IGN);
 
 	while ((ch = getopt(argc, argv,
-	"46C:cDde:FH:hI:i:K:klM:m:NnO:o:P:p:R:rSs:T:tUuV:vw:X:x:z")) != -1) {
+#ifdef CRYPTO
+	"46C:cDde:FH:hI:i:K:klM:m:NnO:o:P:p:R:rSs:T:tUuV:vw:X:x:z"
+#else
+	"46Dde:FhI:i:klM:m:NnO:P:p:rSs:tUuvw:X:x:z"
+#endif
+	)) != -1) {
 		switch (ch) {
 		case '4':
 			family = AF_INET;