mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 01:12:40 +08:00
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
dabbf30377
commit
d4f7011688
@ -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 New Issue
Block a user