Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also ignore gaierror on revdns check #24

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

rwstauner
Copy link

This seems a little odd to me, but i don't know a lot about networking stuff.

I'd been using sshuttle successfully for several days with --auto-hosts and --seed-hosts
when all of a sudden it became unusable:
it would die after just a few seconds when it tried to lookup something that looked like an ip address (when I expected it to be looking for a name).
Like I said, it seemed odd to me, but after watching the verbose output go by and then error,
I tried this patch and it worked.

If this seems odd to you and you want more information let me know and I'll try to track down whatever was causing it again.

Otherwise, what do you think about this?

Thanks!
and thanks for this project... it's a huge help for me (instead of sshing to work, then tmux and all my other ssh's under that).

apenwarr and others added 22 commits January 2, 2012 18:19
I guess we were causing the kernel to syslog on every single packet on
MacOS.  Oops.
If the subprocess was trying to write to its stdout/stderr, its process
would never actually finish because it was blocked waiting for us to read
it, but we were blocked on waitpid().  Instead, use waitpid(WNOHANG) and
continually read from the subprocess (which should be a blocking operation)
until it exits.
Not sure if this will fix anything, but it might stop the problem reported
on some MacOS versions where the firewall doesn't get cleaned up correctly.
(apenwarr: also updates to the matching, latest minimal/do)
This makes it easier (possible?) to generate sshuttle.8 from sshuttle.md on
MacOS.  We also import the git-enhanced version numbering magic so the
generated manpage can have a real version number.
Now that we imported the feature from redo, might as well use it.
On top of the bug that already existed in 10.6, Lion also makes the sysctl
needed to fix the problem into a read-only variable, so we have to actually
change it at kernel boot time and force people to reboot.  Nice job, Apple.
And make sshuttle exit with a well-defined exit code (111) if it needs to
reboot.
If the expected arch directory doesn't exist, give up and don't specify arch at
all. Currently it expands to '*' which fails.

[slightly modified by apenwarr]
Add some documentation about the int() vs long() and the reason behind
_shl().  Instead of "from __future__ import generators", just don't use
generators.
There were still a few conditions under some OSes that would cause
firewall.py to terminate without cleaning up the firewall settings.  'pkill
sshuttle' was one of them.  Ignore a couple more signals to further ensure a
correct cleanup.

(This only affects sshuttle --firewall, which is a subprocess of the main
sshuttle process.  The firewall is supposed to exit automatically whenever
the client exits, and so far that part seems to work reliably.)
(Slightly modified by apenwarr)
I've been meaning to add this patch for a long time, but it's especially
important once we add FQDN support to --auto-hosts.  Basically, auto-hosts
will still discover all the hostnames it can, but we'll only add them to
/etc/hosts if their IP address is in one of the routed subnet ranges.  That
prevents polluting the /etc/hosts file with cruft.
(slightly modified by apenwarr)
* fqdn:
  hostwatch: handle fully qualified domain names
  auto-hosts: don't add hosts that aren't being routed by sshuttle.
seems odd, but if it's just ignored, why not
Hasimir added a commit to Hasimir/sshuttle that referenced this pull request Jun 24, 2015
* Merging pull request apenwarr#24.
zimbatm pushed a commit to zimbatm/sshuttle that referenced this pull request Jan 9, 2016
Add resolvconf_nameservers to the list of functions imported from
helpers.
Fixed an instance where the method client.main was being called with
ns_hosts (string obtained from optional argument --ns-hosts) instead of
nslist (list of tuples that was already being passed to other methods).
Should fix issue apenwarr#24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants