go.crypto/ssh: Increase window size.

Increase window size for channels (session and tcpip) to 64 *
max packet size (32 KB), which is the same value that OpenSSH
uses. Also breaks out the relevant harcoded constants into named
constants in channel.go.

Fixes golang/go#6675.

R=golang-dev, dave, hanwen, agl
CC=golang-dev
https://golang.org/cl/18120043
This commit is contained in:
Jakob Borg
2013-11-01 04:24:39 +11:00
committed by Dave Cheney
parent 577ae2abf9
commit 4758fe8ce4
4 changed files with 14 additions and 10 deletions
+2 -2
View File
@@ -567,8 +567,8 @@ func (c *ClientConn) NewSession() (*Session, error) {
if err := c.transport.writePacket(marshal(msgChannelOpen, channelOpenMsg{
ChanType: "session",
PeersId: ch.localId,
PeersWindow: 1 << 14,
MaxPacketSize: 1 << 15, // RFC 4253 6.1
PeersWindow: channelWindowSize,
MaxPacketSize: channelMaxPacketSize,
})); err != nil {
c.chanList.remove(ch.localId)
return nil, err