Skip to content

Commit 38854e0

Browse files
committed
testing
1 parent 218c234 commit 38854e0

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

channels.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,8 +1252,8 @@ channel_tcpwinsz(struct ssh *ssh)
12521252
* the size of the advertised window. Now this means that any HPN to non-HPN
12531253
* connection will be window limited but thats okay. This bug shows up when
12541254
* sending data to an hpn */
1255-
if ((ssh->compat & SSH_RESTRICT_WINDOW) && (tcpwinsz > NON_HPN_WINDOW_MAX))
1256-
tcpwinsz = NON_HPN_WINDOW_MAX;
1255+
//if ((ssh->compat & SSH_RESTRICT_WINDOW) && (tcpwinsz > NON_HPN_WINDOW_MAX))
1256+
// tcpwinsz = NON_HPN_WINDOW_MAX;
12571257
return (tcpwinsz);
12581258
}
12591259

@@ -2368,6 +2368,10 @@ channel_check_window(struct ssh *ssh, Channel *c)
23682368
c->local_consumed > 0) {
23692369
u_int addition = 0;
23702370
u_int32_t tcpwinsz = channel_tcpwinsz(ssh);
2371+
if ((ssh->compat & SSH_RESTRICT_WINDOW) &&
2372+
(tcpwinsz > NON_HPN_WINDOW_MAX))
2373+
tcpwinsz = NON_HPN_WINDOW_MAX;
2374+
23712375
/* adjust max window size if we are in a dynamic environment
23722376
* and the tcp receive buffer is larger than the ssh window */
23732377
if (c->dynamic_window && (tcpwinsz > c->local_window_max)) {
@@ -2386,13 +2390,10 @@ channel_check_window(struct ssh *ssh, Channel *c)
23862390
addition = tcpwinsz - c->local_window_max;
23872391
}
23882392
c->local_window_max += addition;
2389-
sshbuf_set_window_max(c->output, c->local_window_max);
2390-
sshbuf_set_window_max(c->input, c->local_window_max);
2393+
//sshbuf_set_window_max(c->output, c->local_window_max);
2394+
//sshbuf_set_window_max(c->input, c->local_window_max);
23912395
debug("Channel %d: Window growth to %d by %d bytes",c->self,
23922396
c->local_window_max, addition);
2393-
//if ((ssh->compat & SSH_RESTRICT_WINDOW) &&
2394-
// (addition > NON_HPN_WINDOW_MAX))
2395-
// addition = NON_HPN_WINDOW_MAX;
23962397
}
23972398
if (!c->have_remote_id)
23982399
fatal_f("channel %d: no remote id", c->self);

kex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ kex_exchange_identification(struct ssh *ssh, int timeout_ms,
16001600
if (version_addendum != NULL && *version_addendum == '\0')
16011601
version_addendum = NULL;
16021602
if ((r = sshbuf_putf(our_version, "SSH-%d.%d-%s%s%s\r\n",
1603-
PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION,
1603+
PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_RELEASE,
16041604
version_addendum == NULL ? "" : " ",
16051605
version_addendum == NULL ? "" : version_addendum)) != 0) {
16061606
oerrno = errno;

sshbuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ sshbuf_check_reserve(const struct sshbuf *buf, size_t len)
371371
void
372372
sshbuf_set_window_max(struct sshbuf *buf, size_t len)
373373
{
374-
buf->window_max = len;
374+
//buf->window_max = len;
375375
}
376376

377377
int

0 commit comments

Comments
 (0)