Commit 16f87a30 authored by Julien Muchembled's avatar Julien Muchembled

Stop specifying a rxcost for old nodes since there's none left with the new protocol

parent bec6b3cf
...@@ -60,7 +60,7 @@ def client(iface, address_list, encrypt, *args, **kw): ...@@ -60,7 +60,7 @@ def client(iface, address_list, encrypt, *args, **kw):
def router(subnet, hello_interval, table, log_path, state_path, pidfile, def router(subnet, hello_interval, table, log_path, state_path, pidfile,
tunnel_interfaces, control_socket, default, *args, **kw): control_socket, default, *args, **kw):
s = utils.ipFromBin(subnet) s = utils.ipFromBin(subnet)
n = len(subnet) n = len(subnet)
cmd = ['babeld', cmd = ['babeld',
...@@ -80,8 +80,6 @@ def router(subnet, hello_interval, table, log_path, state_path, pidfile, ...@@ -80,8 +80,6 @@ def router(subnet, hello_interval, table, log_path, state_path, pidfile,
cmd[-2:-2] = '-C', 'redistribute ip ::/0 eq 0' cmd[-2:-2] = '-C', 'redistribute ip ::/0 eq 0'
if control_socket: if control_socket:
cmd += '-R', '%s' % control_socket cmd += '-R', '%s' % control_socket
for iface in tunnel_interfaces:
cmd += '-C', 'interface %s legacy-rxcost 5120' % iface
cmd += args cmd += args
# WKRD: babeld fails to start if pidfile already exists # WKRD: babeld fails to start if pidfile already exists
try: try:
......
...@@ -239,7 +239,7 @@ def main(): ...@@ -239,7 +239,7 @@ def main():
my_ip += '/%s' % len(subnet) my_ip += '/%s' % len(subnet)
# Init db and tunnels # Init db and tunnels
tunnel_interfaces = server_tunnels.keys() config.babel_args += 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)]
...@@ -250,7 +250,7 @@ def main(): ...@@ -250,7 +250,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)
tunnel_interfaces += tunnel_manager.new_iface_list config.babel_args += tunnel_manager.new_iface_list
else: else:
tunnel_manager = tunnel.BaseTunnelManager(cache, cert) tunnel_manager = tunnel.BaseTunnelManager(cache, cert)
cleanup.append(tunnel_manager.sock.close) cleanup.append(tunnel_manager.sock.close)
...@@ -354,7 +354,7 @@ def main(): ...@@ -354,7 +354,7 @@ def main():
os.path.join(config.log, 'babeld.log'), os.path.join(config.log, 'babeld.log'),
os.path.join(config.state, 'babeld.state'), os.path.join(config.state, 'babeld.state'),
os.path.join(config.run, 'babeld.pid'), os.path.join(config.run, 'babeld.pid'),
tunnel_interfaces, control_socket, cache.babel_default, control_socket, cache.babel_default,
*config.babel_args).stop) *config.babel_args).stop)
if config.up: if config.up:
exit.release() exit.release()
......
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