[Bug 3116] New: ExitOnForwardFailure=yes does not cause connection to die when server fails to open tunnel

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Wed Jan 29 21:40:59 AEDT 2020


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

            Bug ID: 3116
           Summary: ExitOnForwardFailure=yes does not cause connection to
                    die when server fails to open tunnel
           Product: Portable OpenSSH
           Version: 8.1p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: anton at khirnov.net

I am using ssh to create a tap tunnel between two mashines. The client
commandline looks roughly like this:
ssh -f -N -y -v -o Tunnel=ethernet -o ServerAliveInterval=30 -o
ServerAliveCountMax=3 -o ExitOnForwardFailure=yes -w 0:0 user at server

If the server fails to open the tunnel device on its end (e.g. because
some other process is still holding on to it), I get the following in
the client's log:

debug1: Requesting tun unit 0 in mode 2
debug1: sys_tun_open: tap0 mode 2 fd 4
debug1: Tunnel forwarding using interface tap0
debug1: channel 0: new [tun]
debug1: Requesting no-more-sessions at openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00 at openssh.com
want_reply 0
debug1: Remote: /var/local/yharnam/.ssh/authorized_keys:1: key options:
agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /var/local/yharnam/.ssh/authorized_keys:1: key options:
agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: Failed to open the tunnel device.
channel 0: open failed: connect failed: open failed
debug1: channel 0: free: tun, nchannels 1

but the connection does not terminate. Since ExitOnForwardFailure
documentation indicates it should terminate if tunnel setup fails, this
would seem to be a bug.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list