fix(client): use correct socket option for IPv4 TOS reception on Linux

This commit is contained in:
Nils Andreas Svee committed 2026-05-10 20:56:43 +07:00
1 parent 26fbe86e90
commit 44ffb9557a
1 file changed
+1 -1
+1 -1
View File
@@ -15,7 +15,7 @@ pub(crate) fn configure_receive_metadata(socket: &UdpSocket, remote: SocketAddr)
enable_kernel_rx_timestamps(socket)?; enable_kernel_rx_timestamps(socket)?;
let socket = socket2::SockRef::from(socket); let socket = socket2::SockRef::from(socket);
if remote.is_ipv4() { if remote.is_ipv4() {
socket.set_recv_tos(true) socket.set_recv_tos_v4(true)
} else { } else {
socket.set_recv_tclass_v6(true) socket.set_recv_tclass_v6(true)
} }