mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-11-29 15:36:36 -05:00
skip publishing relay for fullconenat
This commit is contained in:
parent
945215aba1
commit
6bb35dd6a6
2 changed files with 18 additions and 4 deletions
|
|
@ -128,7 +128,18 @@ impl RoutingDomainDetailCommon {
|
|||
self.dial_info_details.clone()
|
||||
);
|
||||
|
||||
let relay_info = self
|
||||
// Check if any of our dialinfo require a relay for signaling
|
||||
// FullConeNAT requires a relay but it does not have to be published because it does not require signaling
|
||||
let mut publish_relay = false;
|
||||
for did in self.dial_info_details() {
|
||||
if did.class.requires_signal() {
|
||||
publish_relay = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let relay_info = if publish_relay {
|
||||
self
|
||||
.relay_node
|
||||
.as_ref()
|
||||
.and_then(|rn| {
|
||||
|
|
@ -145,7 +156,10 @@ impl RoutingDomainDetailCommon {
|
|||
} else {
|
||||
None
|
||||
}
|
||||
});
|
||||
})
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let signed_node_info = match relay_info {
|
||||
Some((relay_ids, relay_sdni)) => SignedNodeInfo::Relayed(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue