Description of problem: When a UDP port is scanned with netcat (nc) on a remote IP address, nc always returns success. Version-Release number of selected component (if applicable): 1.78-2 How reproducible: Always. Steps to Reproduce: 1. Run "nc -uz IP port" 2. Run "echo $?" Actual results: Returns 0 (success). Expected results: Should return 1 Additional info: On xen2 box: ============================================== [root@xen2 ~]# ping -c 1 xen1 PING xen1.test.det.nsw.edu.au (192.168.20.1) 56(84) bytes of data. 64 bytes from xen1.test.det.nsw.edu.au (192.168.20.1): icmp_seq=0 ttl=64 time=0.109 ms --- xen1.test.det.nsw.edu.au ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.109/0.109/0.109/0.000 ms, pipe 2 [root@xen2 ~]# nc -uz xen1 4005 Connection to xen1 4005 port [udp/*] succeeded! [root@xen2 ~]# echo $? 0 [root@xen2 ~]# nc -uz 192.168.20.1 4005 Connection to 192.168.20.1 4005 port [udp/*] succeeded! [root@xen2 ~]# echo $? 0 ============================================== On xen1 box: ============================================== [root@xen1 ~]# netstat -an | grep 4005 [root@xen1 ~]# nc -uz 192.168.20.1 4005 [root@xen1 ~]# echo $? 1 [root@xen1 ~]# nc -uz xen1 4005 [root@xen1 ~]# echo $? 1 ============================================== BTW, xen1 and xen2 are connected via a private interconnect. All is good when scanning TCP ports.
Still the same with Rawhide (FC5) nc-1.82-1.
Created attachment 131866 [details] Slightly improving UPD scan by giving the target machine a chance to reply
Thanks, patch applied on rawhide.