set ttl
This commit is contained in:
parent
ff581dff6f
commit
1680284107
1 changed files with 3 additions and 2 deletions
|
@ -197,8 +197,9 @@ impl Daemon {
|
||||||
|
|
||||||
let interface_names = config.peers.iter().map(|peer| peer.interface.clone()).collect::<HashSet<_>>();
|
let interface_names = config.peers.iter().map(|peer| peer.interface.clone()).collect::<HashSet<_>>();
|
||||||
let interfaces = interface_names.into_iter().map(|interface_name| wg_dump(&interface_name).map(|ifinfo| (interface_name, ifinfo))).collect::<Result<HashMap<_, _>>>()?;
|
let interfaces = interface_names.into_iter().map(|interface_name| wg_dump(&interface_name).map(|ifinfo| (interface_name, ifinfo))).collect::<Result<HashMap<_, _>>>()?;
|
||||||
let socket = UdpSocket::bind(SocketAddr::new("0.0.0.0".parse()?, config.gossip_port))?;
|
let socket = UdpSocket::bind(SocketAddr::new("[::]".parse()?, config.gossip_port))?;
|
||||||
socket.set_broadcast(true)?;
|
//socket.set_broadcast(true)?;
|
||||||
|
socket.set_ttl(1)?;
|
||||||
|
|
||||||
let peers = config.peers.iter().map(|peer_cfg| {
|
let peers = config.peers.iter().map(|peer_cfg| {
|
||||||
(
|
(
|
||||||
|
|
Loading…
Add table
Reference in a new issue