| Summary: | BindAddress and -b not working | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Craig <murple> | ||||||||
| Component: | ssh | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> | ||||||||
| Status: | CLOSED FIXED | ||||||||||
| Severity: | normal | ||||||||||
| Priority: | P2 | ||||||||||
| Version: | -current | ||||||||||
| Hardware: | UltraSPARC | ||||||||||
| OS: | Solaris | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Craig
2003-03-21 15:01:25 AEDT
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 |