Events: fixed setting of IP_BIND_ADDRESS_NO_PORT/SO_REUSEADDR.
The IP_BIND_ADDRESS_NO_PORT option is set on upstream sockets if proxy_bind does not specify a port. The SO_REUSEADDR option is set on UDP upstream sockets if proxy_bind specifies a port. Due to checking of the wrong port, IP_BIND_ADDRESS_NO_PORT was never set, and SO_REUSEPORT was always set.
This commit is contained in:
parent
b83431f900
commit
d40e8e1625
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
|
|||
#endif
|
||||
|
||||
#if (NGX_HAVE_IP_BIND_ADDRESS_NO_PORT || NGX_LINUX)
|
||||
port = ngx_inet_get_port(pc->sockaddr);
|
||||
port = ngx_inet_get_port(pc->local->sockaddr);
|
||||
#endif
|
||||
|
||||
#if (NGX_HAVE_IP_BIND_ADDRESS_NO_PORT)
|
||||
|
|
Loading…
Reference in a new issue