summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-01-25 04:48:26 +0000
committerDamien Miller <djm@mindrot.org>2020-01-25 15:51:20 +1100
commit0ecd20bc9f0b9c7c697c9eb014613516c8f65834 (patch)
tree537b0b832eec9db341f96d7a3cf182d4ba05b447 /serverloop.c
parenta0c81d2402eedc514b9c9f25ef9604eb0576b86a (diff)
upstream: unrevert this:
> revision 1.217 > date: 2019/11/27 03:34:04; author: dtucker; state: Exp; lines: +5 -7; commitid: wkiMn49XJyjzoJIs; > Make channel_id u_int32_t and remove unnecessary check and cast that were > left over from the type conversion. Noted by t-hashida@amiya.co.jp in > bz#3098, ok markus@ djm@ Darren was right the first time; ok dtucker@ "agreed" markus@ OpenBSD-Commit-ID: 641dd1b99a6bbd85b7160da462ae1be83432c7c8
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/serverloop.c b/serverloop.c
index 1babc7a51..e16eabe27 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.219 2020/01/23 07:10:22 dtucker Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.220 2020/01/25 04:48:26 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -685,9 +685,7 @@ server_input_channel_open(int type, u_int32_t seq, struct ssh *ssh)
685 debug("%s: ctype %s rchan %u win %u max %u", __func__, 685 debug("%s: ctype %s rchan %u win %u max %u", __func__,
686 ctype, rchan, rwindow, rmaxpack); 686 ctype, rchan, rwindow, rmaxpack);
687 687
688 if (rchan > INT_MAX) { 688 if (strcmp(ctype, "session") == 0) {
689 error("%s: invalid remote channel ID", __func__);
690 } else if (strcmp(ctype, "session") == 0) {
691 c = server_request_session(ssh); 689 c = server_request_session(ssh);
692 } else if (strcmp(ctype, "direct-tcpip") == 0) { 690 } else if (strcmp(ctype, "direct-tcpip") == 0) {
693 c = server_request_direct_tcpip(ssh, &reason, &errmsg); 691 c = server_request_direct_tcpip(ssh, &reason, &errmsg);
@@ -698,7 +696,7 @@ server_input_channel_open(int type, u_int32_t seq, struct ssh *ssh)
698 } 696 }
699 if (c != NULL) { 697 if (c != NULL) {
700 debug("%s: confirm %s", __func__, ctype); 698 debug("%s: confirm %s", __func__, ctype);
701 c->remote_id = (int)rchan; 699 c->remote_id = rchan;
702 c->have_remote_id = 1; 700 c->have_remote_id = 1;
703 c->remote_window = rwindow; 701 c->remote_window = rwindow;
704 c->remote_maxpacket = rmaxpack; 702 c->remote_maxpacket = rmaxpack;