Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bind to ipv6 address #278

Open
BChabanne opened this issue Sep 28, 2024 · 0 comments
Open

bind to ipv6 address #278

BChabanne opened this issue Sep 28, 2024 · 0 comments

Comments

@BChabanne
Copy link

BChabanne commented Sep 28, 2024

It seems that it is not possible for capnp-rpc server to bind to ipv6 addresses.

The error I get when serving such vat config

  let vat_config =Capnp_rpc_unix.Vat_config.create ~secret_key:(`File "/tmp/key") (`TCP ("::1", 7000))

is Failure("Unknown host \"::1\"")

After searching a little bit, I found this related issue ocaml/ocaml#13114
It seems that the function gethostbyname is not supporting ipv6 but getaddrinfo does.

Would it make sense to use getaddrinfo in files unix/network.ml and unix/capnp_rpc_unix.ml ? instead of gethostbyname to support ipv6 ?

If ipv6 is to be supported, Network.Location.of_string would also need to be reworked a bit, because command line parsing would fail with

'--capnp-listen-address': PORT must be an integer

If there are no other big blockers you can think of, I can start to work on a PR to support ipv6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant