Bug 240 - ssh fails to handle errno == EHOSTUNREACH properly
Summary: ssh fails to handle errno == EHOSTUNREACH properly
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: -current
Hardware: All All
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-13 17:15 AEST by schwartz+q-bugzilla-mindrot
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description schwartz+q-bugzilla-mindrot 2002-05-13 17:15:48 AEST
ssh is littered with open coded checks of errno after a read or write.
As a matter of good engineering, these should be consolidated into one
routine, try_again(errno).

The current set of checks (which are quite inconsistent) fail to
include all the values of errno that signal that a retry is called for.
For example, EHOSTUNREACH, is an advisory rather than an error.  Currently
ssh will abort a session when TCP/IP is perfectly happy to continue.
Because we want ssh to be robust and reliable, this oversight should
be repaired.

One might argue that if write constantly returns EHOSTUNREACH then we
should quit.  That's reasonable, and it underscores that the current
behaviour is wrong.  It should indeed require many advisories before 
taking such action.
Comment 1 Damien Miller 2003-01-07 18:03:18 AEDT
When are you seeing EHOSTUNREACH? Not on write()...
Comment 2 Damien Miller 2003-05-16 13:15:48 AEST
4 months, no response == no bug
Comment 3 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED