Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
ldms_xprt_listen_by_name()
prefers IPv6.
`ldms_xprt_listen_by_name()` listened to 0.0.0.0 IPv4 address by default if `host` is `NULL`. This patch made `ldms_xprt_listen_by_name()` to fully rely on `getaddrinfo()` in resolving the addresses, and then we pick the first IPv6 address. If no IPv6 addresses available, the first address returned by `getaddrinfo()` is used. This has been tested with `ldmsd` on IPv4-only machine, and IPv4+6 machine. On IPv4+6 machine, if the users only to listen on IPv4 addresses, they have to either provide listening address on the CLI (e.g. `-x sock:411:0.0.0.0`), or specify the host in config file (e.g. `listen port=411 xprt=sock host=0.0.0.0`).
- Loading branch information