server: add addresses to nic and bind to them

fmt

add address

save bindings
This commit is contained in:
Luna Yao
2026-04-28 02:01:23 +02:00
parent 7d536d3353
commit 185777b741
3 changed files with 190 additions and 110 deletions
+2 -4
View File
@@ -1,7 +1,5 @@
use crate::common::global_ctx::{ArcGlobalCtx, GlobalCtxEvent};
use crate::dns::config::{
DNS_NODE_RR_INTERVAL, DNS_SERVER_ELECTION_INTERVAL, DNS_SERVER_RPC_ADDR,
};
use crate::dns::config::{DNS_NODE_RR_INTERVAL, DNS_SERVER_ELECTION_INTERVAL, DNS_SERVER_RPC_ADDR};
use crate::dns::peer_mgr::DnsPeerMgr;
use crate::dns::server::DnsServer;
#[cfg(feature = "tun")]
@@ -224,7 +222,7 @@ impl DnsNode {
let runtime = runtime.clone();
CancellableTask::spawn(|token| async move {
runtime.elect.notify_one();
tokio::join!(runtime.run_election(token.clone()), runtime.run(token),);
tokio::join!(runtime.run_election(token.clone()), runtime.run(token));
})
};