You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Machine ssrt have basic iptables/ip-rule setup, where IPv4 TCP, IPv4 UDP and IPv6 TCP relaying works fine. But when I try IPv6 nslookup on cl, it fails.
root@cl:~$ nslookup www.google.com 2606:4700:4700::1111
;; connection timed out; no servers could be reached
ss-redir process (for the IPv6) on ssrt shows following message:
The real problem lies in several lines earlier in the same function.
int opt = 1;
int sol = remote_ctx->src_addr.ss_family == AF_INET6 ? SOL_IPV6 : SOL_IP;
if (setsockopt(src_fd, sol, IP_TRANSPARENT, &opt, sizeof(opt))) {
This executes setsockopt(src_fd, SOL_IPV6, IP_TRANSPARENT, ...) in case of IPv6, which actually does setsockopt(src_fd, SOL_IPV6, IPV6_MULTICAST_LOOP, ...), because IP_TRANSPARENT is not an option for SOL_IPV6.
This fails to set TRANSPARENT option for the socket, thus bind(2) fails to bind an foreign address.
The correct way would be either: setsockopt(src_fd, SOL_IP, IP_TRANSPARENT, ...) (which works for IPv6 sockets anyway)
or setsockopt(src_fd, SOL_IPV6, IPV6_TRANSPARENT, ...) (in case of IPv6 sockets).
What version of shadowsocks-libev are you using?
This issue affects from v3.3.0 to current.
What operating system are you using?
I tested on Ubuntu Bionic and Eoan.
What did you do?
What did you expect to see?
What did you see instead?
see above.
What is your config in detail (with all sensitive info masked)?
I don't think you need configurations for this case. Let me know if you didn't reproduce the issue.
Am I the only one who uses IPv6 UDP relaying?
The text was updated successfully, but these errors were encountered:
Starting from version 3.3.0, ss-redir seems not be able to relay IPv6 UDP packets, at least on linux.
I have this socksified-router testing setup.
Machine
ssrt
have basic iptables/ip-rule setup, where IPv4 TCP, IPv4 UDP and IPv6 TCP relaying works fine. But when I try IPv6 nslookup oncl
, it fails.ss-redir
process (for the IPv6) onssrt
shows following message:which suggests bind(2) in remote_recv_cb() (udprelay.c; around line 850) failed.
The real problem lies in several lines earlier in the same function.
This executes
setsockopt(src_fd, SOL_IPV6, IP_TRANSPARENT, ...)
in case of IPv6, which actually doessetsockopt(src_fd, SOL_IPV6, IPV6_MULTICAST_LOOP, ...)
, becauseIP_TRANSPARENT
is not an option forSOL_IPV6
.This fails to set TRANSPARENT option for the socket, thus bind(2) fails to bind an foreign address.
The correct way would be either:
setsockopt(src_fd, SOL_IP, IP_TRANSPARENT, ...)
(which works for IPv6 sockets anyway)or
setsockopt(src_fd, SOL_IPV6, IPV6_TRANSPARENT, ...)
(in case of IPv6 sockets).What version of shadowsocks-libev are you using?
This issue affects from v3.3.0 to current.
What operating system are you using?
I tested on Ubuntu Bionic and Eoan.
What did you do?
What did you expect to see?
What did you see instead?
see above.
What is your config in detail (with all sensitive info masked)?
I don't think you need configurations for this case. Let me know if you didn't reproduce the issue.
Am I the only one who uses IPv6 UDP relaying?
The text was updated successfully, but these errors were encountered: