From fd46d288c4583cccf2fcaa3c304a044ff5ba197a Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 10 Mar 2026 18:32:51 +0000 Subject: [PATCH] Ncat DTLS: shutdown connection on stdin EOF --- ncat/ncat_listen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ncat/ncat_listen.c b/ncat/ncat_listen.c index 0081446a4..898f9a6db 100644 --- a/ncat/ncat_listen.c +++ b/ncat/ncat_listen.c @@ -402,13 +402,13 @@ restart_fd_loop: } else { /* Read from stdin and write to all clients. */ rc = read_stdin(&qtv); - if (rc == 0 && type == SOCK_STREAM) { + if (rc == 0 && (type == SOCK_STREAM || o.ssl)) { + if (!o.noshutdown) shutdown_sockets(SHUT_WR); if (o.quitafter == 0 && (o.proto != IPPROTO_TCP || (o.proto == IPPROTO_TCP && o.sendonly))) { /* There will be nothing more to send. If we're not receiving anything, we can quit here. */ return 0; } - if (!o.noshutdown) shutdown_sockets(SHUT_WR); } if (rc < 0) return 1;