Skip to content

Commit a4d684c

Browse files
committed
Fixed IPv6 TProxy listener option: IPV6_TRANSPARENT
1 parent bf6f200 commit a4d684c

File tree

1 file changed

+3
-3
lines changed
  • src/relay/tcprelay/redir/sys/unix

1 file changed

+3
-3
lines changed

src/relay/tcprelay/redir/sys/unix/linux.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ fn create_redir_listener(addr: &SocketAddr) -> io::Result<TcpListener> {
109109
let ret = match *addr {
110110
SocketAddr::V4(..) => libc::setsockopt(
111111
fd,
112-
libc::SOL_IP,
112+
libc::IPPROTO_IP,
113113
libc::IP_TRANSPARENT,
114114
&enable as *const _ as *const _,
115115
mem::size_of_val(&enable) as libc::socklen_t,
116116
),
117117
SocketAddr::V6(..) => libc::setsockopt(
118118
fd,
119-
libc::SOL_IPV6,
120-
libc::IP_TRANSPARENT,
119+
libc::IPPROTO_IPV6,
120+
libc::IPV6_TRANSPARENT,
121121
&enable as *const _ as *const _,
122122
mem::size_of_val(&enable) as libc::socklen_t,
123123
),

0 commit comments

Comments
 (0)