Description of problem: netcat does not accept port names instead of port numbers if option "-w" is used. The commandline parsing seems to be broken. netcat of FC3 did not have this problem. Version-Release number of selected component (if applicable): nc-1.82-fc4.1 How reproducible: always Steps to Reproduce: 1. nc mailserver 25 2. nc mailserver smtp 3. nc -w 5 mailserver 25 4. nc -w 5 mailserver smtp Actual results: 1. ok, smtp banner is shown 2. ok, smtp banner is shown 3. ok, smtp banner is shown 4. failure, error "nc: port range not valid" Expected results: 4. ok, smtp banner is shown Additional info: /etc/services: smtp 25/tcp mail smtp 25/udp mail /etc/nsswitch.conf: services: files
I'm suprised that this works for you. I don't see a simple line in the code or in man page that port names should be resolved to port numbers .. ~# nc mail.localhost smtp nc: port range not valid ~# nc mail.localhost 25 220 mail.localhost ESMTP Sendmail 8.12.8/8.12.8; Tue, 18 Oct 2005 10:42:37 +0200