Modify bb_lookup_port to allow the protocol to be specified, allowing
/etc/services support for inetd, netcat and tftp.
This commit is contained in:
@ -599,7 +599,7 @@ extern int telnet_main(int argc, char** argv)
|
||||
bb_show_usage();
|
||||
|
||||
bb_lookup_host(&s_in, argv[1]);
|
||||
s_in.sin_port = bb_lookup_port((argc == 3) ? argv[2] : "telnet", 23);
|
||||
s_in.sin_port = bb_lookup_port((argc == 3) ? argv[2] : "telnet", "tcp", 23);
|
||||
|
||||
G.netfd = xconnect(&s_in);
|
||||
|
||||
|
Reference in New Issue
Block a user