diff --git a/boringtun/src/device/peer.rs b/boringtun/src/device/peer.rs index d7f2c22e..3bf3655b 100644 --- a/boringtun/src/device/peer.rs +++ b/boringtun/src/device/peer.rs @@ -117,7 +117,7 @@ impl Peer { .expect("Attempt to connect to undefined endpoint"); let udp_conn = - socket2::Socket::new(Domain::for_address(addr), Type::STREAM, Some(Protocol::UDP))?; + socket2::Socket::new(Domain::for_address(addr), Type::DGRAM, Some(Protocol::UDP))?; udp_conn.set_reuse_address(true)?; let bind_addr = if addr.is_ipv4() { SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, port).into()