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:
+4
-6
@@ -356,12 +356,10 @@ func (c *ClientConn) handleChanOpen(msg *channelOpenMsg) {
|
||||
ch.maxPacket = msg.MaxPacketSize
|
||||
|
||||
m := channelOpenConfirmMsg{
|
||||
PeersId: ch.remoteId,
|
||||
MyId: ch.localId,
|
||||
MyWindow: 1 << 14,
|
||||
|
||||
// As per RFC 4253 6.1, 32k is also the minimum.
|
||||
MaxPacketSize: 1 << 15,
|
||||
PeersId: ch.remoteId,
|
||||
MyId: ch.localId,
|
||||
MyWindow: channelWindowSize,
|
||||
MaxPacketSize: channelMaxPacketSize,
|
||||
}
|
||||
|
||||
c.transport.writePacket(marshal(msgChannelOpenConfirm, m))
|
||||
|
||||
Reference in New Issue
Block a user