Commit 0e16e61d authored by Guillaume Bury's avatar Guillaume Bury

Small fixes in tunnel and registry

parent 2e7cac36
...@@ -5,20 +5,6 @@ from email.mime.text import MIMEText ...@@ -5,20 +5,6 @@ from email.mime.text import MIMEText
from OpenSSL import crypto from OpenSSL import crypto
import utils import utils
# Fix for librpcxml to avoid doing reverse dns on each request
# it was causing a 5-10s delay on each request when no reverse DNS was avalaible
# for tis IP
import BaseHTTPServer
def not_insane_address_string(self):
host, port = self.client_address[:2]
return '%s (no getfqdn)' % host # used to call: socket.getfqdn(host)
BaseHTTPServer.BaseHTTPRequestHandler.address_string = not_insane_address_string
# end of the fix
# To generate server ca and key with serial for 2001:db8:42::/48 # To generate server ca and key with serial for 2001:db8:42::/48
# openssl req -nodes -new -x509 -key ca.key -set_serial 0x120010db80042 -days 365 -out ca.crt # openssl req -nodes -new -x509 -key ca.key -set_serial 0x120010db80042 -days 365 -out ca.crt
......
...@@ -160,11 +160,11 @@ class TunnelManager: ...@@ -160,11 +160,11 @@ class TunnelManager:
ip = bin(int(ip, 16))[2:].rjust(128, '0') ip = bin(int(ip, 16))[2:].rjust(128, '0')
if ip.startswith(self._network): if ip.startswith(self._network):
iface = iface.replace(' ', '') iface = iface.strip()
subnet_size = int(subnet_size, 16) subnet_size = int(subnet_size, 16)
utils.log('Route on iface %s detected to %s/%s' utils.log('Route on iface %s detected to %s/%s'
% (iface, ip, subnet_size), 8) % (iface, ip, subnet_size), 8)
if iface in self._iface_to_prefix.keys() and subnet_size <= 64: if iface in self._iface_to_prefix.keys():
self._connection_dict[self._iface_to_prefix[iface]].routes += 1 self._connection_dict[self._iface_to_prefix[iface]].routes += 1
if iface in self._iface_list and self._net_len < subnet_size < 128: if iface in self._iface_list and self._net_len < subnet_size < 128:
prefix = ip[self._net_len:subnet_size] prefix = ip[self._net_len:subnet_size]
......
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