From b862596041377b4f8da8ebddec86fb2d5760a435 Mon Sep 17 00:00:00 2001 From: Ivan Ovchinnikov Date: Tue, 29 Sep 2026 21:09:54 +0000 Subject: [PATCH] QUIC: fixed binary upgrade from older versions Before 63af971a1 (1.31.7), the NGINX_BPF_MAPS environment variable was passed to the new binary on binary upgrade whenever the quic_bpf module was built, even if "quic_bpf" was not enabled, with an empty value if there were no QUIC BPF socket groups. Since 63af971a1, such an empty value was treated as inherited maps, and the new binary refused to start: with the "cannot be disabled during binary upgrade" error if "quic_bpf" was not enabled, or with a parsing error otherwise. The fix is to ignore an empty value, which means there are no maps to inherit. --- src/event/quic/ngx_event_quic_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event/quic/ngx_event_quic_bpf.c b/src/event/quic/ngx_event_quic_bpf.c index 2488d9c75..1095781bc 100644 --- a/src/event/quic/ngx_event_quic_bpf.c +++ b/src/event/quic/ngx_event_quic_bpf.c @@ -149,7 +149,7 @@ ngx_quic_bpf_create_conf(ngx_cycle_t *cycle) * some module, i.e. perl */ env = (u_char *) getenv(NGX_QUIC_BPF_VARNAME); - if (env != NULL) { + if (env != NULL && *env != '\0') { len = ngx_strlen(env); bcf->env = ngx_pnalloc(cycle->pool, len + 1); if (bcf->env == NULL) { -- 2.47.3