Hello,

I ran into this as well, and after some investigation I found out this
only happens when using the verbose flag "-v":

netcat.c, lines 609-616:
----------------------------%<-------------------------------------------------
            if (vflag) {
                /* For UDP, make sure we are connected. */
                if (uflag) {
                    if (udptest(s) == -1) {
                        ret = 1;
                        continue;
                    }
                }
----------------------------%<-------------------------------------------------

netcat.c, lines 1207-1229:
----------------------------%<-------------------------------------------------
/*
 * udptest()
 * Do a few writes to see if the UDP port is there.
 * Fails once PF state table is full.
 */
int
udptest(int s)
{
    int i, t;

    if ((write(s, "X", 1) != 1) ||
        ((write(s, "X", 1) != 1) && (errno == ECONNREFUSED)))
        return -1;

    /* Give the remote host some time to reply. */
    for (i = 0, t = (timeout == -1) ? UDP_SCAN_TIMEOUT : (timeout / 1000);
         i < t; i++) {
        sleep(1);
        if ((write(s, "X", 1) != 1) && (errno == ECONNREFUSED))
            return -1;
    }
    return 1;
}
----------------------------%<-------------------------------------------------

So I believe it can be cured with a simple "don't do it!"[1] :-)

-Christian


[1]  - Doctor, doctor, when I touch my arm here, it hurts!
     - Well, don't touch it then!


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to