changeset 8951:7c0f9bb27763 quic

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.
author Vladimir Homutov <vl@nginx.com>
date Tue, 28 Dec 2021 13:24:58 +0300
parents fb811b6c76ee
children d78972cf4bac
files src/event/quic/ngx_event_quic_bpf.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 *cy
     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);