120,121c120,122 < * Set address family for unspecified Unix domain, < * because these sockaddr's are not be passed to accept(). --- > * Set address family for unspecified Unix domain socket, > * because these sockaddr's are not updated by old BSD systems, > * see comment in nxt_conn_io_accept(). 152c153 < socklen_t len; --- > socklen_t socklen; 164c165,176 < len = c->remote->socklen; --- > sa = &c->remote->u.sockaddr; > socklen = c->remote->socklen; > /* > * The returned socklen is ignored here, because sockaddr_in and > * sockaddr_in6 socklens are not changed. As to unspecified sockaddr_un > * it is 3 byte length and already prepared, because old BSDs return zero > * socklen and do not update the sockaddr_un at all; Linux returns 2 byte > * socklen and updates only the sa_family part; other systems copy 3 bytes > * and truncate surplus zero part. Only bound sockaddr_un will be really > * truncated here. > */ > s = accept(lev->socket.fd, sa, &socklen); 166,175d177 < if (len >= sizeof(struct sockaddr)) { < sa = &c->remote->u.sockaddr; < < } else { < sa = NULL; < len = 0; < } < < s = accept(lev->socket.fd, sa, &len); <