Hi,

I am using Openbsd 4.4 GENERIC#1021 and nc to check if a port is open or
not. The command I use is

#  /usr/bin/nc -z -w 2 192.168.1.10  80

The command works fine if 192.168.1.10 is up, but if ip is non existing it
takes about 1m15sec to exit.

# time /usr/bin/nc -v  -z -w 2 192.168.3.96 80
nc: connect to 192.168.3.96 port 80 (tcp) failed: Connection timed out
    1m14.99s real     0m0.00s user     0m0.00s system

Help says  -w is timeout for connects and final net reads, so nc should exit
after 2 seconds, and it does exit when tested under linux, but not under
openbsd.

Am i doing some thing wrong or is this a bug in nc ?

raj

Reply via email to