drop_multicast is configured with CommandLine
This commit is contained in:
parent
cf847e3241
commit
cb26b985dd
@ -169,7 +169,7 @@ async fn daemonize_me(
|
|||||||
// nat_server2: "47.98.178.3:1265".to_owned(),
|
// nat_server2: "47.98.178.3:1265".to_owned(),
|
||||||
nat_server2: server.clone() +":1366",
|
nat_server2: server.clone() +":1366",
|
||||||
allow_routing: allow_routing,
|
allow_routing: allow_routing,
|
||||||
_drop_multicast: true,
|
_drop_multicast: false,
|
||||||
register_ttl: 1,
|
register_ttl: 1,
|
||||||
mtu: 1400,
|
mtu: 1400,
|
||||||
name: "tau".to_owned(),
|
name: "tau".to_owned(),
|
||||||
|
|||||||
@ -162,7 +162,7 @@ async fn parse_config(uuid: String, args: &CommandLine) -> Result<NodeConfig> {
|
|||||||
let node_conf = NodeConfig {
|
let node_conf = NodeConfig {
|
||||||
name: args.name.to_owned(),
|
name: args.name.to_owned(),
|
||||||
allow_routing: AtomicBool::new(args.allow_routing),
|
allow_routing: AtomicBool::new(args.allow_routing),
|
||||||
_drop_multicast: true,
|
_drop_multicast: args._drop_multicast,
|
||||||
allow_p2p: args.allow_p2p,
|
allow_p2p: args.allow_p2p,
|
||||||
mtu: args.mtu,
|
mtu: args.mtu,
|
||||||
_tos: 0,
|
_tos: 0,
|
||||||
|
|||||||
@ -69,10 +69,6 @@ impl Iface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mask = net_bit_len_to_mask(netbit);
|
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 ip = ip_to_string(&ip);
|
||||||
|
|
||||||
let netbit = ip_to_string(&net_bit_len_to_mask(netbit));
|
let netbit = ip_to_string(&net_bit_len_to_mask(netbit));
|
||||||
@ -123,9 +119,9 @@ impl Iface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let gw = ip_to_string(&default_gw);
|
// let gw = ip_to_string(&default_gw);
|
||||||
debug!("gw = {}", gw);
|
debug!("gw = {}", ip);
|
||||||
if let Err(e) = set_dns(&self.name, network_domain, &gw, self.if_idx) {
|
if let Err(e) = set_dns(&self.name, network_domain, &ip, self.if_idx) {
|
||||||
error!("failed to set dns: {:?}", e);
|
error!("failed to set dns: {:?}", e);
|
||||||
} else {
|
} else {
|
||||||
error!("set dns ok");
|
error!("set dns ok");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user