[Bug 3129] Add IP address to error kex_exchange_identification error message

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Mar 13 14:07:54 AEDT 2020


https://bugzilla.mindrot.org/show_bug.cgi?id=3129

Damien Miller <djm at mindrot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #3365|                            |ok?(dtucker at dtucker.net)
              Flags|                            |

--- Comment #4 from Damien Miller <djm at mindrot.org> ---
Created attachment 3365
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3365&action=edit
use sshpkt_fatal() for kex_exchange_identification() errors

This uses sshpkt_fatal() to record errors from
kex_exchange_identification(). This should make it consistent with most
other exit messages. 

Examples:

[djm at djm openssh]$ ./ssh -p 2222 127.0.0.1
Protocol major versions differ: 2 vs. 1
banner exchange: Connection to 127.0.0.1 port 2222: could not read
protocol version
[djm at djm openssh]$ ./ssh -p 2222 127.0.0.1
kex_exchange_identification: Connection closed by remote host
Connection closed by 127.0.0.1 port 2222

There's arguably a little duplication between the error messages in
some cases, but I think that's acceptable.

Note that this required some renovation of
kex_exchange_identification() to preserve errno for
SSH_ERR_SYSTEM_ERROR cases. That's the bulk of the diff.

-- 
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