Skip to content

Commit b8c668f

Browse files
qinghonceleste-sinead
authored andcommitted
fix: fix udp socket creation argument error #430
fix(serious): fix udp socket create error
1 parent 8e52216 commit b8c668f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎boringtun/src/device/peer.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl Peer {
117117
.expect("Attempt to connect to undefined endpoint");
118118

119119
let udp_conn =
120-
socket2::Socket::new(Domain::for_address(addr), Type::STREAM, Some(Protocol::UDP))?;
120+
socket2::Socket::new(Domain::for_address(addr), Type::DGRAM, Some(Protocol::UDP))?;
121121
udp_conn.set_reuse_address(true)?;
122122
let bind_addr = if addr.is_ipv4() {
123123
SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, port).into()

0 commit comments

Comments
 (0)