mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-25 07:19:26 -05:00
more network triage
This commit is contained in:
parent
70a0346cc3
commit
0f33dfb15d
@ -39,14 +39,23 @@ impl NetworkManager {
|
||||
|
||||
// Try the contact method
|
||||
let sdk = match contact_method {
|
||||
NodeContactMethod::OutboundRelay(relay_nr)
|
||||
NodeContactMethod::OutboundRelay(relay_nr) => {
|
||||
// Relay loop or multiple relays
|
||||
bail!(
|
||||
"Outbound relay loop or multiple relays detected: destination {} resolved to target {} via extraneous relay {}",
|
||||
destination_node_ref,
|
||||
target_node_ref,
|
||||
relay_nr,
|
||||
);
|
||||
|
||||
}
|
||||
| NodeContactMethod::InboundRelay(relay_nr) => {
|
||||
// Relay loop or multiple relays
|
||||
bail!(
|
||||
"Relay loop or multiple relays detected: destination {} resolved to target {} via extraneous relay {}",
|
||||
"Inbound relay loop or multiple relays detected: destination {} resolved to target {} via extraneous relay {}",
|
||||
destination_node_ref,
|
||||
target_node_ref,
|
||||
relay_nr
|
||||
relay_nr,
|
||||
);
|
||||
}
|
||||
NodeContactMethod::Direct(dial_info) => {
|
||||
|
@ -422,7 +422,10 @@ impl RoutingDomainDetail for PublicInternetRoutingDomainDetail {
|
||||
|
||||
// If node A can't reach the node by other means, it may need to use its own relay
|
||||
if let Some(node_a_relay_id) = peer_a.signed_node_info().relay_ids().get(best_ck) {
|
||||
return ContactMethod::OutboundRelay(node_a_relay_id);
|
||||
// Ensure it's not our relay we're trying to reach
|
||||
if node_a_relay_id != node_b_id {
|
||||
return ContactMethod::OutboundRelay(node_a_relay_id);
|
||||
}
|
||||
}
|
||||
|
||||
ContactMethod::Unreachable
|
||||
|
Loading…
Reference in New Issue
Block a user