summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-15 22:17:56 +0900
committerkali <kali@leap.se>2013-01-15 22:17:56 +0900
commitf90f9df1d09e12ba64e9401530684d5a36220ad3 (patch)
tree20e7363fe92b0173d08eb59c09df3bf1a7a756c8
parentade0eded09176fd687d1ee30724468c048d15065 (diff)
todo about ping_gateway function
-rw-r--r--pkg/requirements.pip2
-rw-r--r--src/leap/base/checks.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/pkg/requirements.pip b/pkg/requirements.pip
index dbb04cbc..fa40c490 100644
--- a/pkg/requirements.pip
+++ b/pkg/requirements.pip
@@ -3,7 +3,7 @@
argparse # only for python 2.6
requests<1.0.0
-ping
+ping # don't use it! needs root.
psutil
netifaces
python-gnutls==1.1.9 # see https://bugs.launchpad.net/ubuntu/+source/python-gnutls/+bug/1027129
diff --git a/src/leap/base/checks.py b/src/leap/base/checks.py
index c7839548..4d4a5d8b 100644
--- a/src/leap/base/checks.py
+++ b/src/leap/base/checks.py
@@ -120,6 +120,12 @@ class LeapNetworkChecker(object):
# -- is it a valid ip? (there's something in util)
# -- is it a domain?
# -- can we resolve? -- raise NoDNSError if not.
+
+ # XXX -- needs review!
+ # We cannout use this ping implementation; it needs root.
+ # We need to look for another, poors-man implementation
+ # or wrap around system traceroute (using sh module, fi)
+ # -- kali
packet_loss = ping.quiet_ping(gateway)[0]
if packet_loss > constants.MAX_ICMP_PACKET_LOSS:
raise exceptions.NoConnectionToGateway