Skip to content

Bind to all addresses if host name is unspecified in box.cfg.listen #7152

@locker

Description

@locker

When box.cfg.listen is set to a port number (without specifying a host name), Tarantool binds to one address, ipv4 or ipv6:

box.cfg{listen = 3301}
$ nc -vvz 127.0.0.1 3301
Connection to 127.0.0.1 3301 port [tcp/*] succeeded!
$ nc -vvz ::1 3301
nc: connect to ::1 port 3301 (tcp) failed: Connection refused

This is confusing - one would expect it to bind to all available addresses, like most standard commands do, e.g. both ncat and s_server bind to both ipv4 and ipv6 if the host name is unspecified:

ncat -kl 3301
openssl s_server -key server.key -cert server.crt -accept 3301 -www

Now, that #5928 is fixed, we could bind to all addresses returned by getaddrinfo, not just the first one. Look here.

Metadata

Metadata

Assignees

Labels

3.2Target is 3.2 and all newer release/master branchesbugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions