drop_multicast is configured with CommandLine

This commit is contained in:
alex 2026-04-15 14:19:51 +08:00
parent cf847e3241
commit cb26b985dd
3 changed files with 5 additions and 9 deletions

View File

@ -169,7 +169,7 @@ async fn daemonize_me(
// nat_server2: "47.98.178.3:1265".to_owned(),
nat_server2: server.clone() +":1366",
allow_routing: allow_routing,
_drop_multicast: true,
_drop_multicast: false,
register_ttl: 1,
mtu: 1400,
name: "tau".to_owned(),

View File

@ -162,7 +162,7 @@ async fn parse_config(uuid: String, args: &CommandLine) -> Result<NodeConfig> {
let node_conf = NodeConfig {
name: args.name.to_owned(),
allow_routing: AtomicBool::new(args.allow_routing),
_drop_multicast: true,
_drop_multicast: args._drop_multicast,
allow_p2p: args.allow_p2p,
mtu: args.mtu,
_tos: 0,

View File

@ -69,10 +69,6 @@ impl Iface {
}
let mask = net_bit_len_to_mask(netbit);
let mut default_gw = (ip & mask) + 1;
if default_gw == ip {
default_gw += 1;
}
let ip = ip_to_string(&ip);
let netbit = ip_to_string(&net_bit_len_to_mask(netbit));
@ -123,9 +119,9 @@ impl Iface {
}
}
let gw = ip_to_string(&default_gw);
debug!("gw = {}", gw);
if let Err(e) = set_dns(&self.name, network_domain, &gw, self.if_idx) {
// let gw = ip_to_string(&default_gw);
debug!("gw = {}", ip);
if let Err(e) = set_dns(&self.name, network_domain, &ip, self.if_idx) {
error!("failed to set dns: {:?}", e);
} else {
error!("set dns ok");