more network triage
This commit is contained in:
parent
70a0346cc3
commit
0f33dfb15d
@ -39,14 +39,23 @@ impl NetworkManager {
|
|||||||
|
|
||||||
// Try the contact method
|
// Try the contact method
|
||||||
let sdk = match 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) => {
|
| NodeContactMethod::InboundRelay(relay_nr) => {
|
||||||
// Relay loop or multiple relays
|
// Relay loop or multiple relays
|
||||||
bail!(
|
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,
|
destination_node_ref,
|
||||||
target_node_ref,
|
target_node_ref,
|
||||||
relay_nr
|
relay_nr,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
NodeContactMethod::Direct(dial_info) => {
|
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 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) {
|
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
|
ContactMethod::Unreachable
|
||||||
|
Loading…
Reference in New Issue
Block a user