transport: fix wrong type in non-linux orig_dst_* method (#3538)

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
This commit is contained in:
Zahari Dichev 2025-01-16 19:15:18 +02:00 committed by GitHub
parent a4a55fa5fb
commit 329bee2b3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ fn orig_dst_addr_v6(sock: &TcpStream) -> io::Result<SocketAddr> {
}
#[cfg(not(target_os = "linux"))]
fn orig_dst_addr_v4(_: &TcpStream) -> io::Result<OrigDstAddr> {
fn orig_dst_addr_v4(_: &TcpStream) -> io::Result<SocketAddr> {
Err(io::Error::new(
io::ErrorKind::Other,
"SO_ORIGINAL_DST not supported on this operating system",
@ -126,7 +126,7 @@ fn orig_dst_addr_v4(_: &TcpStream) -> io::Result<OrigDstAddr> {
}
#[cfg(not(target_os = "linux"))]
fn orig_dst_addr_v6(_: &TcpStream) -> io::Result<OrigDstAddr> {
fn orig_dst_addr_v6(_: &TcpStream) -> io::Result<SocketAddr> {
Err(io::Error::new(
io::ErrorKind::Other,
"SO_ORIGINAL_DST not supported on this operating system",