]> git.kaiwu.me - nginx.git/commit
Core: disabled SO_REUSEADDR on UDP sockets while testing config.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 31 May 2021 13:36:51 +0000 (16:36 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 31 May 2021 13:36:51 +0000 (16:36 +0300)
commit52cde89586caa3fffc677e7665f4765f7e7b0a2d
treec1516c5fd460d0b92478f51e72aa13e52bfa2c9c
parent85a104aa4e86ab82fd14493933f01f8822e83ed9
Core: disabled SO_REUSEADDR on UDP sockets while testing config.

On Linux, SO_REUSEADDR allows completely duplicate UDP sockets, so using
SO_REUSEADDR when testing configuration results in packets being dropped
if there is an existing traffic on the sockets being tested (ticket #2187).
While dropped packets are expected with UDP, it is better to avoid this
when possible.

With this change, SO_REUSEADDR is no longer set on datagram sockets when
testing configuration.
src/core/ngx_connection.c