aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2021-12-28 13:24:58 +0300
committerVladimir Homutov <vl@nginx.com>2021-12-28 13:24:58 +0300
commitbef80e70f6c4d4e7ace9f41eef0ff17a3a9120d0 (patch)
tree675b9d16899cc2e802cd8f4af28f01ff045dd1ce /src
parentcd278da5e76682bee2126354e0ad7bbb66db4aa8 (diff)
downloadnginx-bef80e70f6c4d4e7ace9f41eef0ff17a3a9120d0.tar.gz
nginx-bef80e70f6c4d4e7ace9f41eef0ff17a3a9120d0.zip
QUIC: fixed config test with bpf (ticket #2292).
The SO_REUSEPORT socket option is not set during configuration testing, thus making the further module initialization impossible and meaningless.
Diffstat (limited to 'src')
-rw-r--r--src/event/quic/ngx_event_quic_bpf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic_bpf.c b/src/event/quic/ngx_event_quic_bpf.c
index 848a64d59..ab024ad56 100644
--- a/src/event/quic/ngx_event_quic_bpf.c
+++ b/src/event/quic/ngx_event_quic_bpf.c
@@ -130,6 +130,14 @@ ngx_quic_bpf_module_init(ngx_cycle_t *cycle)
ngx_pool_cleanup_t *cln;
ngx_quic_bpf_conf_t *bcf;
+ if (ngx_test_config) {
+ /*
+ * during config test, SO_REUSEPORT socket option is
+ * not set, thus making further processing meaningless
+ */
+ return NGX_OK;
+ }
+
ccf = ngx_core_get_conf(cycle);
bcf = ngx_quic_bpf_get_conf(cycle);