Bug 2806 - bind: Address already in use: should return non-zero
Summary: bind: Address already in use: should return non-zero
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 7.6p1
Hardware: Other Linux
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-05 11:58 AEDT by Dan Jacobson
Modified: 2018-04-06 12:26 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.