diff options
-rw-r--r-- | node/Node.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 75578446..460bf510 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -552,9 +552,13 @@ Node::ReasonForTermination Node::run() rootTopology = ZT_DEFAULTS.defaultRootTopology; try { Dictionary rt(rootTopology); - if (!Topology::authenticateRootTopology(rt)) - return impl->terminateBecause(Node::NODE_UNRECOVERABLE_ERROR,"root-topology failed signature verification check"); - _r->topology->setSupernodes(Dictionary(rt.get("supernodes"))); + if (Topology::authenticateRootTopology(rt)) { + _r->topology->setSupernodes(Dictionary(rt.get("supernodes"))); + } else { + LOG("%s failed signature check, using built-in defaults instead",rootTopologyPath.c_str()); + Utils::rm(rootTopologyPath.c_str()); + _r->topology->setSupernodes(Dictionary(Dictionary(ZT_DEFAULTS.defaultRootTopology).get("supernodes"))); + } } catch ( ... ) { return impl->terminateBecause(Node::NODE_UNRECOVERABLE_ERROR,"invalid root-topology format"); } |