X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f0534a5e2af72c36c12d55f7ea323040e6e9bf36..596e36117322c22fd31372e7803bc197bcd4a016:/src/kernel/routing/NetZoneImpl.cpp diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index 5ed1d62097..08df429aca 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -669,6 +669,24 @@ void NetZoneImpl::get_graph(const s_xbt_graph_t* graph, std::mapsecond; +} + void NetZoneImpl::seal() { /* already sealed netzone */ @@ -676,6 +694,10 @@ void NetZoneImpl::seal() return; do_seal(); // derived class' specific sealing procedure + // for zone with a single host, this host is its own default gateway + if (gateways_.empty() && hosts_.size() == 1) + gateways_["default"] = hosts_.begin()->second->get_iface()->get_netpoint(); + /* seals sub-netzones and hosts */ for (auto* host : get_all_hosts()) { host->seal();