[MDEV-6536] make --bind=hostname to listen on both IPv6 and IPv4 addresses Created: 2014-08-05  Updated: 2022-12-08  Resolved: 2021-03-04

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.6.0

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Daniel Black
Resolution: Fixed Votes: 6
Labels: None

Issue Links:
Problem/Incident
causes MDEV-26194 bind_address = :: no longer listens o... Closed
Relates
relates to MDEV-5536 Support systemd socket activation Closed
relates to MDEV-4379 expand MariaDB dual-stack support Closed

 Description   

This is a spin-off from MDEV-4379. Quoting from there

If a mariadb is configured to bind to a hostname, it should be possible for it to bind to both the ipv4 and ipv6 addresses defined for that hostname if the host is set up that way. This is the standard behavior with server software (openldap, postfix, apache, etc). Most also include options to force binding only to a specific ip protocol if desired. This is helpful for dual stack systems where it may be desired to have a server bind to both the ipv4 and ipv6 addresses for serving clients.



 Comments   
Comment by Brad Smith [ 2014-08-23 ]

The lack of support for multiple sockets is what breaks dual-stack support on OpenBSD.

Comment by Daniel Black [ 2018-02-01 ]

MDEV-5536 also needs to expand the number of listening interface descriptors.

Comment by Brad Smith [ 2019-12-31 ]

Still looking forward to this. We're up from 10.0 to 10.4, but IPv6 support is still broken without this.

Comment by Sergei Golubchik [ 2020-10-22 ]

wlad, could you please review this PR too? At least the handle_connections_win.cc part

Comment by Vladislav Vaintroub [ 2020-10-29 ]

I request a change around WaitForMultipleObjects(), in the very unlikely case wait_events.size() exceeds MAXIMUM_WAIT_OBJECTS=64. This would require at least 40 IP addresses for a name, and I'm not sure how it is possible, but the check must be there. Looks OK otherwise.

Comment by Daniel Black [ 2021-03-04 ]

All merged. Feels good to finally close of 6.5 year old bugs.

Thanks rinat.ibragimov for the code. It is helping my MDEV-5536 significantly.

Generated at Thu Feb 08 07:12:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.