summaryrefslogtreecommitdiffstats
path: root/sshuttle/methods
diff options
context:
space:
mode:
authorScott Kuhl <kuhl@mtu.edu>2020-10-18 16:30:29 -0400
committerScott Kuhl <kuhl@mtu.edu>2020-10-18 16:30:29 -0400
commitb7a29acab77abe013dca0f1654606acc5a5d8517 (patch)
tree37f83122576983e63c1b33bdd636b39926638090 /sshuttle/methods
parentc2b10465e7c26ff809e0feec820b6577c5050dfe (diff)
Update/document client's handling of IPv4 and IPv6.
Additional comments, checks, warning messages, and diagnostic information is printed out when the client starts. We assume IPv4 is always present and enabled. We assume IPv6 is not supported when it is disabled at the command line or when it is not supported by the firewall method. Warn if IPv6 is disabled but the user specified IPv6 subnets, IPv6 DNS servers, or IPv6 excludes that are effectively ignored. Instead of indicating which features are on/off, we also indicate if features are available in the verbose output. We also more clearly print the subnets that we forward, excludes, and any redirected DNS servers to the terminal output. These changes should help handling bug reports and make it clearer to users what is happening. It should also make it more graceful when a user specifies a subnet/exclude with hostname that resolves to both IPv4 and IPv6 (but IPv6 is disabled in sshuttle).
Diffstat (limited to 'sshuttle/methods')
-rw-r--r--sshuttle/methods/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sshuttle/methods/__init__.py b/sshuttle/methods/__init__.py
index 6d776e6..7a1d493 100644
--- a/sshuttle/methods/__init__.py
+++ b/sshuttle/methods/__init__.py
@@ -38,6 +38,7 @@ class BaseMethod(object):
@staticmethod
def get_supported_features():
result = Features()
+ result.ipv4 = True
result.ipv6 = False
result.udp = False
result.dns = True
@@ -68,7 +69,7 @@ class BaseMethod(object):
def assert_features(self, features):
avail = self.get_supported_features()
- for key in ["udp", "dns", "ipv6", "user"]:
+ for key in ["udp", "dns", "ipv6", "ipv4", "user"]:
if getattr(features, key) and not getattr(avail, key):
raise Fatal(
"Feature %s not supported with method %s.\n" %