graph-node icon indicating copy to clipboard operation
graph-node copied to clipboard

Bind server to IPv6 as well as IPv4

Open sudhirj opened this issue 4 years ago • 5 comments

Do you want to request a feature or report a bug? Mostly a feature, but sort of a bug. The server currently only binds to IPv4, so it's hard to run in IPv6 environments without something like socat. In let addr = SocketAddrV4::new(Ipv4Addr::new(0, 0, 0, 0), port);

What is the current behavior? The server binds to IPv4 only.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. N/A

What is the expected behavior? It should bind to IPv6 as well.

sudhirj avatar Dec 08 '21 14:12 sudhirj

Thanks @sudhirj . I noticed a few more places where we bind explicitly for IPv4. Fix seems to be simple (I guess by either binding to both as you suggested, or bind to IPv6 which should have a fallback to IPv4).

@azf20 what do you think?

dotansimha avatar Dec 14 '21 16:12 dotansimha

I think that sounds like a reasonable quick fix - binding to IPv6 seems cleanest if it does indeed have the fallback.. @lutter any thoughts on why this wouldn't work?

azf20 avatar Dec 15 '21 23:12 azf20

I haven't looked at it in detail but supporting IPv6 in addition to IPv4 makes absolute sense and we should support it.

lutter avatar Dec 16 '21 00:12 lutter

@lutter I checked and it seems like binding to IPv6 only might be an issue for Linux environments, which needs some extra env configuration (IPV6_V6ONLY) for making both available. I guess we just need to bind to both.

dotansimha avatar Dec 16 '21 08:12 dotansimha

We have an internal use case for IPv6 on our nodes, where we need the HTTP servers to also bind to IPv6.

samthompsonkennedy avatar Jan 21 '24 22:01 samthompsonkennedy