Bug 2806

Summary: bind: Address already in use: should return non-zero
Product: Portable OpenSSH Reporter: Dan Jacobson <jidanni>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WORKSFORME    
Severity: normal CC: djm
Priority: P5    
Version: 7.6p1   
Hardware: Other   
OS: Linux   

Description Dan Jacobson 2017-12-05 11:58:26 AEDT
This should return non-zero

$ ssh -f somesite.example.org -L 10143:somesite.example.org:143 -N ; echo $?
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 10143
Could not request local forwarding.
0

else scripts cannot detect failure!
Comment 1 Damien Miller 2017-12-05 12:05:13 AEDT
Please use the existing ExitOnForwardFailure option
Comment 2 Dan Jacobson 2017-12-05 12:20:04 AEDT
OK. One would have never guessed.
By the way

bind: Address already in use

would be clearer if it said which address:

bind: Address 1020304 already in use
Comment 3 Damien Miller 2017-12-05 13:35:30 AEDT
Done. The next release will have:

bind [127.0.0.1]:1234: Address already in use
bind [::1]:1234: Address already in use
Comment 4 Damien Miller 2018-04-06 12:26:31 AEST
Close all resolved bugs after release of OpenSSH 7.7.