[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian@onerussian.com: /usr/sbin/sshd: wrong DISPLAY is due to hijacking someone other's one...]

Yaroslav Halchenko <debian@onerussian.com> writes:

> and if socket on IPv4 is taken already? this is what lead to the
> original issue.

> So should that "continue" should then be taken only if ai->ai_family ==
> AF_INET6 ?

Maybe.  I don't know that part of the code well.  Looking at INN, we ran
into the problem with listen() rather than bind(), so maybe this is a
different issue.

    /* Walk the list of file descriptors, listen on each, and create new
       channels for each.  Some IPv6 systems already listening on the IPv6
       wildcard address will return EADDRINUSE when trying to listen to the
       IPv4 socket; just ignore that error. */
    okay = false;
    for (i = 0; i < count; i++) {
        if (fds[i] < 0)
        if (listen(fds[i], MAXLISTEN) < 0) {
            if (i != 0 && errno == EADDRINUSE)
            syswarn("SERVER cant listen to socket");
        rc = CHANcreate(fds[i], CTremconn, CSwaiting, RCreader, RCwritedone);
        notice("%s rcsetup %s", LogName, CHANname(rc));
        RCchan[start + i] = rc;
        okay = true;

However, I seem to recall seeing errors with bind as well that we're
currently just ignoring, so I probably don't have a complete fix in INN

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: