From 3a8ca1071e2fbdc6dbea141445065536f5c4b1a5 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 27 Sep 2016 11:54:23 +0200 Subject: [PATCH] Support 0.0.0.0 as host when creating local compute --- gns3server/controller/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py index a773da07..8dab9463 100644 --- a/gns3server/controller/__init__.py +++ b/gns3server/controller/__init__.py @@ -65,10 +65,13 @@ class Controller: log.info("Start controller") yield from self.load() server_config = Config.instance().get_section_config("Server") + host = server_config.get("host", "localhost") + if host == "0.0.0.0": + host = "127.0.0.1" yield from self.add_compute(compute_id="local", name=socket.gethostname(), protocol=server_config.get("protocol", "http"), - host=server_config.get("host", "localhost"), + host=host, port=server_config.getint("port", 3080), user=server_config.get("user", ""), password=server_config.get("password", ""),