Comment 3 for bug 1455644

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Till, could you please double-check this? The code sure looks like it binds to the ipv6 wildcard address:

        struct sockaddr_in6 addr;
        memset(&addr, 0, sizeof addr);
        addr.sin6_family = AF_INET6;
        addr.sin6_port = htons(port);
        addr.sin6_addr = in6addr_any;

        // Bind to localhost
        if (bind(this->sd,
                (struct sockaddr *)&addr,
                sizeof addr) < 0) {
                ERR("Bind on port failed. "
                    "Requested port may be taken or require root permissions.");
                goto error;
        }

Is there any easy way to run this program without having a printer available? You say it should bind to localhost, and the comment says it should bind to localhost, but the code clearly uses in6addr_any rather than in6addr_loopback.

Please double-check with netstat, or let me know how I can double-check with netstat but without a printer...

Thanks