Package: netcat-openbsd Version: 1.89-4 Tags: patch Without this patch, if you run nc -klv, you get a message when a peer connects, but no message when it disconnects. This is disconcerting and is remedied by this small patch.
Observed behaviour: $ nc.openbsd -k -l -v 4300 [sits waiting for connection] [in another window:] $ telnet localhost 4300 Trying 127.0.0.1... Connection from 127.0.0.1 \ Connected to localhost.localdomain. port 4300 [tcp/*] accepted Escape character is '^]'. ^] telnet> quit Connection closed. $ Desired behaviour: $ nc.openbsd -k -l -v 4300 [sits waiting for connection] [in another window:] $ telnet localhost 4300 Trying 127.0.0.1... Connection from 127.0.0.1 \ Connected to localhost.localdomain. port 4300 [tcp/*] accepted Escape character is '^]'. ^] telnet> quit Connection closed, \ Connection closed. listening again. $ Ian. commit 66723df624b1d9f78e7e0546aa9a371c2f75846d Author: Ian Jackson <i...@liberator.relativity.greenend.org.uk> Date: Tue Apr 27 23:05:43 2010 +0100 Print a message on close when -kv diff --git a/netcat.c b/netcat.c index 678e557..eac43f8 100644 --- a/netcat.c +++ b/netcat.c @@ -376,6 +376,8 @@ main(int argc, char *argv[]) if (!kflag) break; + if (vflag) + fprintf(stderr, "Connection closed, listening again.\n"); } } else if (family == AF_UNIX) { ret = 0; -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org