| Summary: | Connection error should report failure instead of success | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Mike Manning <mvrmanning> | ||||||
| Component: | ssh | Assignee: | Damien Miller <djm> | ||||||
| Status: | CLOSED FIXED | ||||||||
| Severity: | minor | CC: | djm, dtucker | ||||||
| Priority: | P5 | ||||||||
| Version: | 7.6p1 | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 2782 | ||||||||
| Attachments: |
|
||||||||
Created attachment 3108 [details]
revised diff
Try a bit harder to preserve errno, but print something less wrong if errno==0
oops, I committed this a while back: commit 7c77991f5de5d8475cbeb7cbb06d0c7d1611d7bb Author: djm@openbsd.org <djm@openbsd.org> Date: Tue Jan 23 05:17:04 2018 +0000 upstream commit try harder to preserve errno during ssh_connect_direct() to make the final error message possibly accurate; bz#2814, ok dtucker@ OpenBSD-Commit-ID: 57de882cb47381c319b04499fef845dd0c2b46ca Close all resolved bugs after release of OpenSSH 7.7. |
Created attachment 3106 [details] Suggested diff When the connection fails, the error handling reports success if no errno was provided, as this defaults to 0 (Success). As this can never be the case when an error occurs, instead the output should show a failure. Forced example: ssh -6 -b 10.0.0.3 vyatta@2000::4 getaddrinfo: 10.0.0.3: Address family for hostname not supported ssh: connect to host 2000::4 port 22: Success