Tunnel freezes



Hello.

I am creating tunnel to my home machine from my work machine this way
(rknight.homelinux.net is my home machine):

ssh -vvv rknight.homelinux.net -L 0.0.0.0:5222:rknight.homelinux.net:5222 -N

When I use this tunnel (doing HTTP query) you can see this in console
(for each query):

----
debug1: Connection to port 5222 forwarding to rknight.homelinux.net
port 5222 requested.
debug2: fd 5 setting TCP_NODELAY
debug2: fd 5 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 1: new [direct-tcpip]
debug2: channel 1: open confirm rwindow 2097152 rmax 32768
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: channel 1: close_write
debug2: channel 1: output drain -> closed
debug2: channel 1: read<=0 rfd 5 len 0
debug2: channel 1: read failed
debug2: channel 1: close_read
debug2: channel 1: input open -> drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug2: channel 1: input drain -> closed
debug2: channel 1: send close
debug3: channel 1: will not send data after close
debug2: channel 1: rcvd close
debug3: channel 1: will not send data after close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: direct-tcpip: listening port 5222 for
rknight.homelinux.net port 5222, connect from 127.0.0.1 port 54212,
nchannels 2
debug3: channel 1: status: The following connections are open:
#1 direct-tcpip: listening port 5222 for rknight.homelinux.net port
5222, connect from 127.0.0.1 port 54212 (t4 r0 i3/0 o3/0 fd 5/5 cfd
-1)
----

debug3: channel 1: close_fds r 5 w 5 e -1 c -1

But after some time this happens:

----
debug1: channel 8: new [direct-tcpip]
debug2: channel 3: open confirm rwindow 2097152 rmax 32768
debug2: channel 1: open confirm rwindow 2097152 rmax 32768
debug2: channel 4: open confirm rwindow 2097152 rmax 32768
debug2: channel 5: open confirm rwindow 2097152 rmax 32768
debug2: channel 6: open confirm rwindow 2097152 rmax 32768
debug2: channel 7: open confirm rwindow 2097152 rmax 32768
debug2: channel 8: open confirm rwindow 2097152 rmax 32768
debug2: channel 2: read<=0 rfd 6 len 0
debug2: channel 2: read failed
debug2: channel 2: close_read
debug2: channel 2: input open -> drain
debug2: channel 2: ibuf empty
debug2: channel 2: send eof
debug2: channel 2: input drain -> closed
debug2: channel 2: rcvd eof
debug2: channel 2: output open -> drain
debug2: channel 2: obuf empty
debug2: channel 2: close_write
debug2: channel 2: output drain -> closed
debug2: channel 3: rcvd eof
debug2: channel 3: output open -> drain
debug2: channel 2: send close
debug3: channel 2: will not send data after close
debug2: channel 3: obuf empty
debug2: channel 3: close_write
debug2: channel 3: output drain -> closed
debug2: channel 3: read<=0 rfd 7 len 0
debug2: channel 3: read failed
debug2: channel 3: close_read
debug2: channel 3: input open -> drain
debug3: channel 2: will not send data after close
debug2: channel 3: ibuf empty
debug2: channel 3: send eof
debug2: channel 3: input drain -> closed
debug2: channel 3: send close
debug3: channel 2: will not send data after close
debug3: channel 3: will not send data after close
----

And tunnel freezes. Nothin can pass tunnel and after some time tunnel exits.

What is happening and how can i fix this?

--
Marko Kevac