@@ -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 );
0 commit comments