ok djm On Sun, 11 Oct 2020, Klemens Nanni wrote:
> CVS log shows that the following commit removed usage of it: > > sshconnect.c > revision 1.241 > date: 2013/10/16 02:31:46; author: djm; state: Exp; lines: +29 -45; > Implement client-side hostname canonicalisation to allow an explicit > search path of domain suffixes to use to convert unqualified host names > to fully-qualified ones for host key matching. > [...] > > So it is unused ever since in the only call chain: > ssh(1) main() -> ssh_connect() -> ssh_connect_direct(). > > I came here after reading the code when ssh(1)'s `-4' would not effect > jump hosts, i.e. `-J' or `ProxyJump'... only to find out later that I > didn't read the manual properly in the first place: > > -J destination > [...] > Note that configuration directives supplied on the command-line > generally apply to the destination host and not any specified > jump hosts. Use ~/.ssh/config to specify configuration for jump > hosts. > > Compiles and works fine as before. > Feedback? Objections? OK? > > > Index: ssh.c > =================================================================== > RCS file: /cvs/src/usr.bin/ssh/ssh.c,v > retrieving revision 1.537 > diff -u -p -r1.537 ssh.c > --- ssh.c 3 Oct 2020 09:22:26 -0000 1.537 > +++ ssh.c 10 Oct 2020 00:35:49 -0000 > @@ -1521,7 +1521,7 @@ main(int ac, char **av) > > /* Open a connection to the remote host. */ > if (ssh_connect(ssh, host, host_arg, addrs, &hostaddr, options.port, > - options.address_family, options.connection_attempts, > + options.connection_attempts, > &timeout_ms, options.tcp_keep_alive) != 0) > exit(255); > > Index: sshconnect.c > =================================================================== > RCS file: /cvs/src/usr.bin/ssh/sshconnect.c,v > retrieving revision 1.339 > diff -u -p -r1.339 sshconnect.c > --- sshconnect.c 7 Oct 2020 02:26:28 -0000 1.339 > +++ sshconnect.c 10 Oct 2020 00:35:47 -0000 > @@ -420,8 +420,8 @@ fail: > */ > static int > ssh_connect_direct(struct ssh *ssh, const char *host, struct addrinfo *aitop, > - struct sockaddr_storage *hostaddr, u_short port, int family, > - int connection_attempts, int *timeout_ms, int want_keepalive) > + struct sockaddr_storage *hostaddr, u_short port, int connection_attempts, > + int *timeout_ms, int want_keepalive) > { > int on = 1, saved_timeout_ms = *timeout_ms; > int oerrno, sock = -1, attempt; > @@ -511,13 +511,13 @@ ssh_connect_direct(struct ssh *ssh, cons > int > ssh_connect(struct ssh *ssh, const char *host, const char *host_arg, > struct addrinfo *addrs, struct sockaddr_storage *hostaddr, u_short port, > - int family, int connection_attempts, int *timeout_ms, int want_keepalive) > + int connection_attempts, int *timeout_ms, int want_keepalive) > { > int in, out; > > if (options.proxy_command == NULL) { > return ssh_connect_direct(ssh, host, addrs, hostaddr, port, > - family, connection_attempts, timeout_ms, want_keepalive); > + connection_attempts, timeout_ms, want_keepalive); > } else if (strcmp(options.proxy_command, "-") == 0) { > if ((in = dup(STDIN_FILENO)) == -1 || > (out = dup(STDOUT_FILENO)) == -1) { > Index: sshconnect.h > =================================================================== > RCS file: /cvs/src/usr.bin/ssh/sshconnect.h,v > retrieving revision 1.42 > diff -u -p -r1.42 sshconnect.h > --- sshconnect.h 7 Oct 2020 02:22:23 -0000 1.42 > +++ sshconnect.h 10 Oct 2020 00:36:25 -0000 > @@ -35,7 +35,7 @@ struct ssh; > > int ssh_connect(struct ssh *, const char *, const char *, > struct addrinfo *, struct sockaddr_storage *, u_short, > - int, int, int *, int); > + int, int *, int); > void ssh_kill_proxy_command(void); > > void ssh_login(struct ssh *, Sensitive *, const char *, > >