Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sshuttle
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pub
sshuttle
Commits
dcce0fa3
Unverified
Commit
dcce0fa3
authored
Sep 08, 2020
by
Brian May
Committed by
GitHub
Sep 08, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #520 from skuhl/master
Fix #494 sshuttle caught in infinite select() loop.
parents
3ee74ddf
7573011a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
requirements.txt
requirements.txt
+1
-0
client.py
sshuttle/client.py
+17
-4
No files found.
requirements.txt
View file @
dcce0fa3
setuptools-scm
==4.1.2
psutil
sshuttle/client.py
View file @
dcce0fa3
...
...
@@ -6,6 +6,7 @@ import subprocess as ssubprocess
import
os
import
sys
import
platform
import
psutil
import
sshuttle.helpers
as
helpers
import
sshuttle.ssnet
as
ssnet
...
...
@@ -541,11 +542,23 @@ def _main(tcp_listener, udp_listener, fw, ssh_cmd, remotename,
debug1
(
'seed_hosts:
%
r
\n
'
%
seed_hosts
)
mux
.
send
(
0
,
ssnet
.
CMD_HOST_REQ
,
str
.
encode
(
'
\n
'
.
join
(
seed_hosts
)))
while
1
:
rv
=
serverproc
.
poll
()
if
rv
:
raise
Fatal
(
'server died with error code
%
d'
%
rv
)
def
check_ssh_alive
():
if
daemon
:
# poll() won't tell us when process exited since the
# process is no longer our child (it returns 0 all the
# time).
if
not
psutil
.
pid_exists
(
serverproc
.
pid
):
raise
Fatal
(
'ssh connection to server (pid
%
d) exited.'
%
serverproc
.
pid
)
else
:
rv
=
serverproc
.
poll
()
# poll returns None if process hasn't exited.
if
rv
is
not
None
:
raise
Fatal
(
'ssh connection to server (pid
%
d) exited'
'with returncode
%
d'
%
(
serverproc
.
pid
,
rv
))
while
1
:
check_ssh_alive
()
ssnet
.
runonce
(
handlers
,
mux
)
if
latency_control
:
mux
.
check_fullness
()
...
...
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