TcpListener/ListenerConfig support configure IPV6_V6ONLY [monoio] - TagMerge

TcpListener/ListenerConfig support configure IPV6_V6ONLY [monoio]

pymongoAsked 5 months ago

Is your feature request related to a problem? Please describe. I want TcpListener bind both ipv4 and ipv6 (dual stack)

Describe the solution you'd like Add a config in struct ListenerConfig for ipv6_v6only

Describe alternatives you've considered None

Additional context

[w@ww ~]$ sysctl net.ipv6.bindv6only
net.ipv6.bindv6only = 0


Source: link

pymongoAnswered 5 months ago

I notice that the only_v6 was set to true after bind(before bind is false)

If syscall setsockopt(IPV6_V6ONLY to true) after bind() would get a errno 22 (Invalid arguments)

ihciahAnswered 5 months ago

Maybe you have tried to implement this configuration, can you submit a PR? BTW, if you would like to submit a PR, please help to modify the default value of reuse_addr to true :D

pymongoAnswered 5 months ago

seems setsockopt() IPV6_V6ONLY settings can not change

[::] listen both ipv4 and ipv6 (dual stack)

[::1] listen ipv6 only

dyxushuaiAnswered 5 months ago

good job

Recent Issues

    Programming Languages