[Bug 3526] Config option AddressFamily has no effect?

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Tue Oct 17 09:22:44 AEDT 2023


nix-muell at gmx.net changed:

           What    |Removed                     |Added
   Attachment #3741|0                           |1
        is obsolete|                            |

--- Comment #8 from nix-muell at gmx.net ---
Created attachment 3746
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3746&action=edit
filter addresses by AddressFamily at connect time

(In reply to Damien Miller from comment #7)
> could you try replacing the -1 with AF_UNSPEC?
Yep, that flies.

Another improvement: If no address matches the configured address
family, the error message would just "failure".
Making it `errno = EAFNOSUPPORT;` (instead of errno = 0) results in a
nice(r) "Address family not supported by protocol family".
Not quite the "Could not resolve hostname" that would result from
non-canonicalized hosts, but better than just plain "failure".

I also think this new if block should be inserted right after the first
one. That would spare otherwise wasted getnameinfo lookups.

You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.

More information about the openssh-bugs mailing list