Opened 8 years ago

Closed 7 years ago

#1280 closed defect (invalid)

ngx_event_connect_peer() recvbuf doesn't exist

Reported by: yan.sheng.upai.com@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.11.x
Keywords: Cc:
uname -a:
nginx -V: 1.11.6

Description

ngx_event_connect_peer() sets SO_RECVBUF, but no initializing the pc->recvbuf.

if (pc->rcvbuf) {

if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,

(const void *) &pc->rcvbuf, sizeof(int)) == -1)

{

ngx_log_error(NGX_LOG_ALERT, pc->log, ngx_socket_errno,

"setsockopt(SO_RCVBUF) failed");

goto failed;

}

}

Change History (4)

comment:1 by Maxim Dounin, 8 years ago

Resolution: invalid
Status: newclosed

The pc->rcvbuf field is expected to be initialized by the caller. Currently, all callers in nginx itself initialize it to 0, and thus default SO_RCVBUF is used.

comment:2 by yan.sheng.upai.com@…, 8 years ago

Resolution: invalid
Status: closedreopened

comment:3 by yan.sheng.upai.com@…, 8 years ago

which caller? such as?

comment:4 by Maxim Dounin, 7 years ago

Resolution: invalid
Status: reopenedclosed
Note: See TracTickets for help on using tickets.