[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH 3/4] Don't use bb_lookup_port() for well known ports
From:       Sergey Ponomarev <stokito () gmail ! com>
Date:       2021-09-09 22:21:01
Message-ID: CADR0UcW8i9rOXGufjRt8cOZ36rB--s6+V05e0hkAt3srbQtrww () mail ! gmail ! com
[Download RAW message or body]

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 <vda.linux@googlemail.com> wrote:
>
> On Wed, Aug 25, 2021 at 10:15 PM Sergey Ponomarev <stokito@gmail.com> 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
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic