Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nxssh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Алексей Аляев
nxssh
Commits
f9bc409e
Commit
f9bc409e
authored
7 years ago
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retrieved lost code (bug for SSL session)
parent
89251d49
master
ci/latest-build
cygwin-build
fix-openssl-1.1.patch-bug12901
7.5-alt13
7.5-alt12
7.5-alt11
7.5-alt10
7.5-alt9
7.5-alt8
7.5-alt7
7.5-alt6
7.5-alt5
7.5-alt4
7.5-alt3
7.5-alt2
7.5-alt1
7.5-alt0.5
7.5-alt0.4
7.5-alt0.M80P.0.5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
channels.c
channels.c
+58
-0
No files found.
channels.c
View file @
f9bc409e
...
@@ -2073,6 +2073,48 @@ channel_post_open(Channel *c, fd_set *readset, fd_set *writeset)
...
@@ -2073,6 +2073,48 @@ channel_post_open(Channel *c, fd_set *readset, fd_set *writeset)
return
;
return
;
channel_handle_efd
(
c
,
readset
,
writeset
);
channel_handle_efd
(
c
,
readset
,
writeset
);
channel_check_window
(
c
);
channel_check_window
(
c
);
/*
* If we received the switch command then
* tie the channel to the running proxy or
* to descriptors inherited from nxserver.
*/
if
(
nx_check_switch
&&
nx_switch_received
)
{
if
(
nx_switch_forward
==
1
)
{
if
(
nx_switch_forward_descriptors
(
c
)
<
0
)
{
fatal
(
"NX> 290 Error while switching communication"
);
}
}
else
if
(
nx_switch_forward
==
2
)
{
if
(
nx_switch_forward_port
(
c
)
<
0
)
{
fatal
(
"NX> 290 Error while switching communication"
);
}
}
else
{
int
proxy_fd
;
proxy_fd
=
nx_open_proxy_connection
();
if
(
proxy_fd
<
0
)
{
fatal
(
"NX> 290 Error while switching communication"
);
}
nx_check_proxy_authentication
(
proxy_fd
);
if
(
nx_switch_client_side_descriptors
(
c
,
proxy_fd
)
<
0
)
{
fatal
(
"NX> 290 Error while switching communication"
);
}
}
}
}
}
static
u_int
static
u_int
...
@@ -2966,6 +3008,13 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
...
@@ -2966,6 +3008,13 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
packet_disconnect
(
"Received ieof for nonexistent channel %d."
,
id
);
packet_disconnect
(
"Received ieof for nonexistent channel %d."
,
id
);
if
(
channel_proxy_upstream
(
c
,
type
,
seq
,
ctxt
))
if
(
channel_proxy_upstream
(
c
,
type
,
seq
,
ctxt
))
return
0
;
return
0
;
if
(
nx_check_switch
&&
!
nx_switch_received
)
{
debug
(
"NX> 280 Ignoring EOF on the monitored channel"
);
}
else
{
chan_rcvd_ieof
(
c
);
chan_rcvd_ieof
(
c
);
/* XXX force input close */
/* XXX force input close */
...
@@ -2975,6 +3024,7 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
...
@@ -2975,6 +3024,7 @@ channel_input_ieof(int type, u_int32_t seq, void *ctxt)
if
(
buffer_len
(
&
c
->
input
)
==
0
)
if
(
buffer_len
(
&
c
->
input
)
==
0
)
chan_ibuf_empty
(
c
);
chan_ibuf_empty
(
c
);
}
}
}
return
0
;
return
0
;
}
}
...
@@ -3030,8 +3080,16 @@ channel_input_oclose(int type, u_int32_t seq, void *ctxt)
...
@@ -3030,8 +3080,16 @@ channel_input_oclose(int type, u_int32_t seq, void *ctxt)
packet_disconnect
(
"Received oclose for nonexistent channel %d."
,
id
);
packet_disconnect
(
"Received oclose for nonexistent channel %d."
,
id
);
if
(
channel_proxy_upstream
(
c
,
type
,
seq
,
ctxt
))
if
(
channel_proxy_upstream
(
c
,
type
,
seq
,
ctxt
))
return
0
;
return
0
;
packet_check_eom
();
packet_check_eom
();
if
(
nx_check_switch
&&
!
nx_switch_received
)
{
debug
(
"NX> 280 Ignoring CLOSE on the monitored channel"
);
}
else
{
chan_rcvd_oclose
(
c
);
chan_rcvd_oclose
(
c
);
}
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment