Commit d2471188 authored by Julien Muchembled's avatar Julien Muchembled

Drop experimental support of RINA

parent e820ae1f
This diff is collapsed.
...@@ -3,7 +3,7 @@ import subprocess, struct, sys, time, weakref ...@@ -3,7 +3,7 @@ import subprocess, struct, sys, time, weakref
from collections import defaultdict, deque from collections import defaultdict, deque
from bisect import bisect, insort from bisect import bisect, insort
from OpenSSL import crypto from OpenSSL import crypto
from . import ctl, plib, rina, utils, version, x509 from . import ctl, plib, utils, version, x509
PORT = 326 PORT = 326
...@@ -197,7 +197,6 @@ class BaseTunnelManager(object): ...@@ -197,7 +197,6 @@ class BaseTunnelManager(object):
_geoiplookup = None _geoiplookup = None
_forward = None _forward = None
_next_rina = True
def __init__(self, control_socket, cache, cert, conf_country, address=()): def __init__(self, control_socket, cache, cert, conf_country, address=()):
self.cert = cert self.cert = cert
...@@ -281,9 +280,6 @@ class BaseTunnelManager(object): ...@@ -281,9 +280,6 @@ class BaseTunnelManager(object):
self.ctl.select(r, w, t) self.ctl.select(r, w, t)
def refresh(self): def refresh(self):
if self._next_rina and rina.update(self, False):
self._next_rina = False
self.__request_dump('rina')
self._next_refresh = time.time() + self.cache.hello self._next_refresh = time.time() + self.cache.hello
self.checkRoutingCache() self.checkRoutingCache()
...@@ -296,10 +292,6 @@ class BaseTunnelManager(object): ...@@ -296,10 +292,6 @@ class BaseTunnelManager(object):
self.ctl.request_dump() self.ctl.request_dump()
requesting_dump.add(reason) requesting_dump.add(reason)
def _babel_dump_rina(self):
rina.update(self, True)
self._next_rina = True
def babel_dump(self): def babel_dump(self):
for x in self.__requesting_dump: for x in self.__requesting_dump:
getattr(self, '_babel_dump_' + x)() getattr(self, '_babel_dump_' + x)()
...@@ -508,17 +500,7 @@ class BaseTunnelManager(object): ...@@ -508,17 +500,7 @@ class BaseTunnelManager(object):
if code == 3 and tunnel_killer.state == 'locked': # response if code == 3 and tunnel_killer.state == 'locked': # response
self._kill(peer) self._kill(peer)
elif code == 4: # node information elif code == 4: # node information
if msg: if not msg:
if not peer:
return
try:
ask, ver, protocol, rina_enabled = json.loads(msg)
except ValueError:
ask = rina_enabled = False
rina.enabled(self, peer, rina_enabled)
if ask:
return self._info(False)
else:
return "%s, %s" % (version.version, platform.platform()) return "%s, %s" % (version.version, platform.platform())
elif code == 5: elif code == 5:
# the registry wants to know the topology for debugging purpose # the registry wants to know the topology for debugging purpose
...@@ -532,16 +514,6 @@ class BaseTunnelManager(object): ...@@ -532,16 +514,6 @@ class BaseTunnelManager(object):
if peer and self._prefix == self.cache.registry_prefix: if peer and self._prefix == self.cache.registry_prefix:
logging.info("%s/%s: %s", int(peer, 2), len(peer), msg) logging.info("%s/%s: %s", int(peer, 2), len(peer), msg)
def askInfo(self, prefix):
return self.sendto(prefix, '\4' + self._info(True))
def _info(self, ask):
return json.dumps((ask,
version.version,
version.protocol,
rina.shim is not None,
))
@staticmethod @staticmethod
def _restart(): def _restart():
raise utils.ReexecException( raise utils.ReexecException(
...@@ -805,7 +777,6 @@ class TunnelManager(BaseTunnelManager): ...@@ -805,7 +777,6 @@ class TunnelManager(BaseTunnelManager):
#if remove and len(self._connecting) < len(self._free_iface_list): #if remove and len(self._connecting) < len(self._free_iface_list):
# self._tuntap(self._free_iface_list.pop()) # self._tuntap(self._free_iface_list.pop())
self._next_refresh = time.time() + 5 self._next_refresh = time.time() + 5
rina.update(self, True)
def _cleanDeads(self): def _cleanDeads(self):
disconnected = False disconnected = False
......
...@@ -215,8 +215,6 @@ class Peer(object): ...@@ -215,8 +215,6 @@ class Peer(object):
def connected(self): def connected(self):
return self._last is None or time.time() < self._last + 60 return self._last is None or time.time() < self._last + 60
subject_serial = Cert.subject_serial
def __ne__(self, other): def __ne__(self, other):
raise AssertionError raise AssertionError
__eq__ = __ge__ = __le__ = __ne__ __eq__ = __ge__ = __le__ = __ne__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment