The only thing it does is error because of a check added in sockargs() in
uipc_syscalls r1.155. As guenther pointed out, this may have been added
because of a misreading of the last sentence of the first paragraph of the
connect(2) manual.
Instead of erroring, this will keep listening if -k is given and otherwise
it will close the socket and exit with success.
ok guenther jeremy
-/* $OpenBSD: netcat.c,v 1.227 2024/08/02 21:08:47 jan Exp $ */
+/* $OpenBSD: netcat.c,v 1.228 2024/08/05 07:16:30 tb Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
* Copyright (c) 2015 Bob Beck. All rights reserved.
close(connfd);
tls_free(tls_cctx);
}
- if (family == AF_UNIX && uflag) {
- if (connect(s, NULL, 0) == -1)
- err(1, "connect");
- }
if (!kflag)
break;