fix(server): mark a mapped listener with the IPv4 option

This commit is contained in:
Nils Andreas Svee committed 2026-08-14 11:49:05 +07:00
1 parent 2d88939ed4
commit aed7eef454
4 files changed
+95 -5

No files matched your search

+4 -2
View File
@@ -12,7 +12,9 @@ use thiserror::Error;
use tokio::{net::UdpSocket, time::MissedTickBehavior};
use crate::{
socket_io, socket_options::set_reply_traffic_class, ServerConfig, ServerCore, ServerError,
socket_io,
socket_options::{marks_with_ipv4_option, set_reply_traffic_class},
ServerConfig, ServerCore, ServerError,
};
/// Fixed transport receive capacity.
@@ -123,7 +125,7 @@ impl Server {
socket,
core: ServerCore::new(config),
recv_buffer: vec![0; RECEIVE_BUFFER_LEN],
listener_is_ipv4: addr.is_ipv4(),
listener_is_ipv4: marks_with_ipv4_option(addr),
select_reply_source,
socket_is_marked: false,
})