Apply manual peers only as a gateway
This might be a little too broad, you could intheory want manual
peers on the mesh, but it covers the most common usecase.
@@ -211,6 +211,8 @@ impl Handler<PeersToContact> for TunnelManager {
warn!("Neighbor inqury for {:?} failed!", peer);
}
}
+ // Do not contact manual peers if we are not a gateway
+ if SETTING.get_network().is_gateway {
for manual_peer in SETTING.get_network().manual_peers.iter() {
let ip = manual_peer.parse::<IpAddr>();
let port = SETTING.get_network().rita_hello_port;
@@ -235,6 +237,7 @@ impl Handler<PeersToContact> for TunnelManager {
}
}
}
+}
/// Sets out to contact a neighbor, takes a speculative port (only assigned if the neighbor
/// responds successfully) TODO implement callback to return this port
