Agree, we must use the bb_lookup_port(0 in telnet. But speaking about the FTP client it doesn't make sense because there are no other port names that work with ftp. cat /etc/services | grep ftp ftp-data 20/tcp ftp 21/tcp tftp 69/udp sftp 115/tcp ftps-data 989/tcp ftps 990/tcp
you can't connect to sftp with ftp. But as far I remember netutils ftp client makes the port name lookup. That's really strange but yes bb ftp works the same. Such lookup will waste resources if /etc/services is enabled On Thu, 9 Sept 2021 at 22:50, Denys Vlasenko <[email protected]> wrote: > > On Wed, Aug 25, 2021 at 10:15 PM Sergey Ponomarev <[email protected]> wrote: > > The bb_lookup_port() function may resolve port by its name. > > But for FTP or TFTP no any names are expected because they work only with > > one protocol. > > E.g. it doesn't make any sense to execute ftpget -P http. > > This change does not improve anything, right? > Only removes some possibilities. > > > All other programs like traceroute are just use xatou16(). > > # busybox traceroute -p ntp -n 192.168.1.1 > traceroute: invalid number 'ntp' > > But it looks like it should do this. Fedora: > > # traceroute -p ntp -n 192.168.1.1 > traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 60 byte packets > 1 192.168.1.1 3.244 ms 3.208 ms 3.194 ms > > # traceroute --version > Modern traceroute for Linux, version 2.1.0 -- Sergey Ponomarev, skype:stokito _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
