Commit 8c2adc36 authored by Julien Muchembled's avatar Julien Muchembled

Tell babeld that openvpn interfaces are of type tunnel

This reenables RTT-based metric, which
was disabled since we moved to v1.8+.
parent 21ad8a07
...@@ -168,11 +168,15 @@ def main(): ...@@ -168,11 +168,15 @@ def main():
# Make sure we won't tunnel over re6st. # Make sure we won't tunnel over re6st.
config.disable_proto = tuple({'tcp6', 'udp6'}.union( config.disable_proto = tuple({'tcp6', 'udp6'}.union(
config.disable_proto)) config.disable_proto))
def add_tunnels(iface_list):
for iface in iface_list:
config.babel_args += '-C', 'interface %s type tunnel' % iface
config.iface_list += iface_list
address = [] address = []
server_tunnels = {} server_tunnels = {}
forwarder = None forwarder = None
if config.client: if config.client:
config.babel_args.append('re6stnet') add_tunnels(('re6stnet',))
elif config.max_clients: elif config.max_clients:
if config.pp: if config.pp:
pp = [(int(port), proto) for port, proto in config.pp] pp = [(int(port), proto) for port, proto in config.pp]
...@@ -281,7 +285,7 @@ def main(): ...@@ -281,7 +285,7 @@ def main():
os.environ['re6stnet_network'] = my_network os.environ['re6stnet_network'] = my_network
# Init db and tunnels # Init db and tunnels
config.babel_args += server_tunnels add_tunnels(server_tunnels)
timeout = 4 * cache.hello timeout = 4 * cache.hello
cleanup = [lambda: cache.cacheMinimize(config.client_count), cleanup = [lambda: cache.cacheMinimize(config.client_count),
lambda: shutil.rmtree(config.run, True)] lambda: shutil.rmtree(config.run, True)]
...@@ -292,7 +296,7 @@ def main(): ...@@ -292,7 +296,7 @@ def main():
cache, cert, config.openvpn_args, timeout, cache, cert, config.openvpn_args, timeout,
config.client_count, config.iface_list, address, ip_changed, config.client_count, config.iface_list, address, ip_changed,
remote_gateway, config.disable_proto, config.neighbour) remote_gateway, config.disable_proto, config.neighbour)
config.babel_args += tunnel_manager.new_iface_list add_tunnels(tunnel_manager.new_iface_list)
else: else:
tunnel_manager = tunnel.BaseTunnelManager(control_socket, tunnel_manager = tunnel.BaseTunnelManager(control_socket,
cache, cert, address) cache, cert, address)
......
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