Commit 84127aa6 authored by Julien Muchembled's avatar Julien Muchembled

typo

parent 4c34833d
...@@ -28,7 +28,7 @@ running the re6st-registry must also have a client ( re6stnet ) running. ...@@ -28,7 +28,7 @@ running the re6st-registry must also have a client ( re6stnet ) running.
USAGE USAGE
===== =====
The re6st-registry will automatically listen on both ipv4 and ipv6 for incomming The re6st-registry will automatically listen on both ipv4 and ipv6 for incoming
request. request.
--port port --port port
......
...@@ -164,9 +164,9 @@ class PeerManager: ...@@ -164,9 +164,9 @@ class PeerManager:
def handle_message(self, msg): def handle_message(self, msg):
script_type, arg = msg.split() script_type, arg = msg.split()
if script_type == 'client-connect': if script_type == 'client-connect':
logging.info('Incomming connection from %s' % (arg,)) logging.info('Incoming connection from %s' % (arg,))
prefix = utils.binFromSubnet(arg) prefix = utils.binFromSubnet(arg)
if self.tunnel_manager.checkIncommingTunnel(prefix): if self.tunnel_manager.checkIncomingTunnel(prefix):
self.blacklist(prefix, 2) self.blacklist(prefix, 2)
elif script_type == 'client-disconnect': elif script_type == 'client-disconnect':
self.whitelist(utils.binFromSubnet(arg)) self.whitelist(utils.binFromSubnet(arg))
......
...@@ -150,12 +150,9 @@ class TunnelManager: ...@@ -150,12 +150,9 @@ class TunnelManager:
for prefix in self._connection_dict.keys(): for prefix in self._connection_dict.keys():
self._kill(prefix) self._kill(prefix)
def checkIncommingTunnel(self, prefix): def checkIncomingTunnel(self, prefix):
if prefix in self._connection_dict: if prefix in self._connection_dict:
if prefix >= self._prefix: if prefix < self._prefix:
self._kill(prefix)
return True
else:
return False return False
else: self._kill(prefix)
return True return True
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