comparison common-session.c @ 1859:1d86a58fb52d

Leave non-interactive at default QoS class Lower class levels are less well defined, and non-interactive SSH can carry various different types of applications. This change also sets lowdelay class (AF21) earlier in an an outbound dbclient session
author Matt Johnston <matt@ucc.asn.au>
date Thu, 27 Jan 2022 14:34:10 +0800
parents 36e77a51d5e4
children 62e4baa059c3
comparison
equal deleted inserted replaced
1857:6022df862942 1859:1d86a58fb52d
62 } 62 }
63 if (sock_out >= 0) { 63 if (sock_out >= 0) {
64 setnonblocking(sock_out); 64 setnonblocking(sock_out);
65 } 65 }
66 66
67 ses.socket_prio = DROPBEAR_PRIO_DEFAULT; 67 ses.socket_prio = DROPBEAR_PRIO_NORMAL;
68 /* Sets it to lowdelay */ 68 /* Sets it to lowdelay */
69 update_channel_prio(); 69 update_channel_prio();
70 70
71 #if !DROPBEAR_SVR_MULTIUSER 71 #if !DROPBEAR_SVR_MULTIUSER
72 /* A sanity check to prevent an accidental configuration option 72 /* A sanity check to prevent an accidental configuration option
665 if (ses.sock_out < 0) { 665 if (ses.sock_out < 0) {
666 TRACE(("leave update_channel_prio: no socket")) 666 TRACE(("leave update_channel_prio: no socket"))
667 return; 667 return;
668 } 668 }
669 669
670 new_prio = DROPBEAR_PRIO_BULK; 670 new_prio = DROPBEAR_PRIO_NORMAL;
671 for (i = 0; i < ses.chansize; i++) { 671 for (i = 0; i < ses.chansize; i++) {
672 struct Channel *channel = ses.channels[i]; 672 struct Channel *channel = ses.channels[i];
673 if (!channel || channel->prio == DROPBEAR_CHANNEL_PRIO_EARLY) { 673 if (!channel) {
674 if (channel && channel->prio == DROPBEAR_CHANNEL_PRIO_EARLY) {
675 TRACE(("update_channel_prio: early %d", channel->index))
676 }
677 continue; 674 continue;
678 } 675 }
679 any = 1; 676 any = 1;
680 if (channel->prio == DROPBEAR_CHANNEL_PRIO_INTERACTIVE) 677 if (channel->prio == DROPBEAR_PRIO_LOWDELAY) {
681 {
682 TRACE(("update_channel_prio: lowdelay %d", channel->index))
683 new_prio = DROPBEAR_PRIO_LOWDELAY; 678 new_prio = DROPBEAR_PRIO_LOWDELAY;
684 break; 679 break;
685 } else if (channel->prio == DROPBEAR_CHANNEL_PRIO_UNKNOWABLE
686 && new_prio == DROPBEAR_PRIO_BULK)
687 {
688 TRACE(("update_channel_prio: unknowable %d", channel->index))
689 new_prio = DROPBEAR_PRIO_DEFAULT;
690 } 680 }
691 } 681 }
692 682
693 if (any == 0) { 683 if (any == 0) {
694 /* lowdelay during setup */ 684 /* lowdelay during setup */