]> Cypherpunks repositories - gostls13.git/commit
exp/ssh: messages now contain remote channel's id instead of local id
authorGustav Paul <gustav.paul@gmail.com>
Sun, 27 Nov 2011 14:59:20 +0000 (09:59 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 27 Nov 2011 14:59:20 +0000 (09:59 -0500)
commitd859d7deee0845433b9e9770a99c6bcdbed3c920
tree8c3ed461af95573d5bcecbaaff9de5d97c0a6220
parent557ba72e69863ba7d839d86b78edace0c6e20886
exp/ssh: messages now contain remote channel's id instead of local id

According to http://www.ietf.org/rfc/rfc4254.txt most channel messages contain the channel id of the recipient channel, not the sender id. This allows the recipient connection multiplexer to route the message to the correct channel.

This changeset fixes several messages that incorrectly send the local channel id instead of the remote channel's id.

While sessions were being created and closed in sequence channels in the channel pool were freed and reused on the server side of the connection at the same rate as was done on the client, so the channel local and remote channel ids always corresponded. As soon as I had concurrent sessions on the same clientConn the server started to complain of 'uknown channel id N' where N is the local channel id, which is actually paired with server channel id K.

R=golang-dev, dave, rsc, agl
CC=golang-dev
https://golang.org/cl/5433063
src/pkg/exp/ssh/client.go
src/pkg/exp/ssh/session.go
src/pkg/exp/ssh/tcpip.go