getaddrinfo() and SRV records
Jim Rees
rees at umich.edu
Thu Oct 15 04:30:54 EST 2009
Ssh calls getaddrinfo() to get the server address when it makes a
connection, but ignores the port, which I think is bad. Instead it calls
getservbyname(), which is redundant, as getaddrinfo() normally does that for
you.
Among other things, this makes it impossible to use SRV records (rfc2782) on
the server end to point the client at a different port.
Yes, I know that getaddrinfo() does not use SRV records in the default linux
implementation. But that's no reason to ignore the port.
I have attached a patch for your consideration. I am not advocating that
this be committed as-is, just submitting it for discussion. Does this seem
like a good idea? Bad idea? Good idea poorly implemented?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openssh-5.3p1-getaddrinfo.patch
Type: text/x-diff
Size: 2278 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20091014/8b47fdaf/attachment.bin>
More information about the openssh-unix-dev
mailing list