I'm trying to install the OpenSSH3.4p1 on an UltraSparc running SunOS 5.6. The program compiled and runs fine with one problem... The system has two IP addresses, one on a secure network and one facing the outside world. I need to have the ssh client use one of these addresses for its outbound connections. With the old SSH 1.2.x I was able to use the SourceAddress directive in ssh_config to do this. Using OpenSSH3.4p1, neither the BindAddress directive in ssh_config nor the -b commandline switch seem to function on Solaris. A search of Bugzilla found that this was a known problem on Solaris with an older version of OpenSSH about one year ago, but there was no mention of a fix or workaround. It is still not working for me. This is something I need functional for work pretty quickly. Please advise if there is a known fix.
Confirmed with 3.5p1 on Solaris 2.6. Does not occur on Solaris 8 (ie -b works as expected). I note that Solaris 8 has a real getaddrinfo whereas 2.6 does not and uses the compatibility one from openbsd-compat, so there may be something funny going on there.
Created attachment 253 [details] Comment out AI_PASSIVE from sshconnect.c It looks like getaddrinfo() in openbsd-compat doesn't do the right thing when AI_PASSIVE is set. It will always return a null address even when an address is specified (either via ssh -b or sshd's ListenAddress). The patch fixes the ssh -b thing (should AI_PASSIVE be set on a socket that's not going to be listening?) but fake-getaddrinfo seems to need some work for the sshd ListenAddress case too.
Created attachment 254 [details] Try to fix AI_PASSIVE support This (untested) patch may help to fix fake-getaddrinfo's AI_PASSIVE support
Don't have a copy of the CVS tree on my Solaris 2.6 machine. Applied patch to 3.5p1 (minor reject of "u_long addr;", easily fixed). Apart from a missing semicolon at the end of "addr = htonl(0x00000000)" this works for ssh -b and sshd -o ListenAddress.
Created attachment 255 [details] Fixed patch Here is a corrected patch. It will be applied to -current. Users of 3.6p1 (and earlier) will want to apply this if using BindAddress.
Applied to -current
Mass change of RESOLVED bugs to CLOSED