Commit 265cbe53 authored by Julien Muchembled's avatar Julien Muchembled

Remove network suffix from 're6stnet_ip' environment variable

It's already in 're6stnet_subnet' and it's useful to bind to 're6stnet_ip'
without having to edit it first.
parent beef4c8f
...@@ -285,13 +285,14 @@ def main(): ...@@ -285,13 +285,14 @@ def main():
try: try:
subnet = network + prefix subnet = network + prefix
my_ip = '%s/%s' % (utils.ipFromBin(subnet, '1'), len(subnet)) my_ip = utils.ipFromBin(subnet, '1')
my_subnet = '%s/%u' % (utils.ipFromBin(subnet), len(subnet)) my_subnet = '%s/%u' % (utils.ipFromBin(subnet), len(subnet))
my_network = "%s/%u" % (utils.ipFromBin(network), len(network)) my_network = "%s/%u" % (utils.ipFromBin(network), len(network))
os.environ['re6stnet_ip'] = my_ip os.environ['re6stnet_ip'] = my_ip
os.environ['re6stnet_iface'] = config.main_interface os.environ['re6stnet_iface'] = config.main_interface
os.environ['re6stnet_subnet'] = my_subnet os.environ['re6stnet_subnet'] = my_subnet
os.environ['re6stnet_network'] = my_network os.environ['re6stnet_network'] = my_network
my_ip += '/%s' % len(subnet)
# Init db and tunnels # Init db and tunnels
tunnel_interfaces = server_tunnels.keys() tunnel_interfaces = server_tunnels.keys()
......
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