Commit ea9d24b8 authored by Ulysse Beaugnon's avatar Ulysse Beaugnon

OpenVpn and babeld process should now always exit correctly when vifibnet exit

parent 990c8b4b
......@@ -7,12 +7,6 @@ To be done :
number of routes / tunnel
favorise most used roads
Handle LAN internally in order not to have catastrophic results ....
the first thing to do is to include the LAN iface on the intarfaces
given to babel => pb : someone who has a lan acces to our network can
provide false informations. Needs of signature
If it is not sufficient, we could use avahi (dm-dns for linux)
Write docstrings for all class/methods/functions
......
......@@ -178,3 +178,7 @@ class TunnelManager:
utils.log('Routes on iface %s : %s' % (
self._connection_dict[p].iface,
self._connection_dict[p].routes), 5)
def killAll(self):
for prefix in self._connection_dict.keys():
self._kill(prefix)
......@@ -164,6 +164,15 @@ def main():
if forwarder != None and time.time() > forwarder.next_refresh:
forwarder.refresh()
except KeyboardInterrupt:
try:
router.kill()
except:
pass
try:
server_process.kill()
except:
pass
tunnel_manager.killAll()
return 0
if __name__ == "__main__":
......
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