]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mworker: fix typo &= instead of & in proc list serialization
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 13 Mar 2026 16:43:19 +0000 (17:43 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 13 Mar 2026 17:38:24 +0000 (18:38 +0100)
In mworker_proc_list_to_env(), a typo used '&=' instead of '&' when
checking PROC_O_TYPE_WORKER in child->options. This would corrupt the
options field by clearing all bits except PROC_O_TYPE_WORKER, but since
the function is called right before the master re-execs itself during a
reload, the corruption has no actual effect: the in-memory proc_list is
discarded by the exec, and the options field is not serialized to the
environment anyway.

This should be backported to all maintained versions.

src/mworker.c

index fd5427b11f572c30956bf2cdfd17d80b75c9bf47..4d5e544bb41aa792cf9295761ea1598c43c9671d 100644 (file)
@@ -121,7 +121,7 @@ void mworker_proc_list_to_env()
 
                if (child->options & PROC_O_TYPE_MASTER)
                        type = 'm';
-               else if (child->options &= PROC_O_TYPE_WORKER)
+               else if (child->options & PROC_O_TYPE_WORKER)
                        type = 'w';
 
                if (child->pid > -1)