NVIDIA / DCGM

NVIDIA Data Center GPU Manager (DCGM) is a project for gathering telemetry and measuring the health of NVIDIA GPUs
Apache License 2.0
355 stars 49 forks source link

DCGM cannot listen on ipv6 address #150

Open Pingan2017 opened 5 months ago

Pingan2017 commented 5 months ago

DCGM cannot listen on v6 address.

    if (m_tcpParameters.value().bindIPAddress.size() > 0)
    {
        /* Convert mSocketPath to a number in network byte order */
        if (!inet_aton(m_tcpParameters.value().bindIPAddress.c_str(), &listenAddr.sin_addr))
        {
            DCGM_LOG_ERROR << "Unable to convert \"" << m_tcpParameters.value().bindIPAddress
                           << "\" to a network address.";
            close(m_tcpListenSocketFd);
            m_tcpListenSocketFd = -1;
            return DCGM_ST_GENERIC_ERROR;
        }
    }

inet_aton cannot parse IPv6 Address, we need use inet_pton