]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: deviceatlas: refresh the user-agent evidence id after a reload
authorDavid Carlier <dcarlier@deviceatlas.com>
Tue, 20 Oct 2026 14:59:03 +0000 (15:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 26 Oct 2026 10:36:26 +0000 (11:36 +0100)
The user-agent evidence id used by da-csv-conv was only computed at init.
Ids belong to the data file, so after a hot-reload of a file with a
different header list, da-csv-conv could pass a stale id and return wrong
or empty properties until restart.

This should be backported to lower branches.

addons/deviceatlas/da.c

index 157ebb11023429d0de94598a1306f85500e63832..ee2822aaa6fd4d6455579a5efdd080ae41a6fb2e 100644 (file)
@@ -335,6 +335,8 @@ static void da_haproxy_checkinst(void)
                     cold = global_deviceatlas.atlasimgptr;
                     global_deviceatlas.atlasimgptr = cnew;
                     global_deviceatlas.atlas = inst;
+                    global_deviceatlas.useragentid = da_atlas_header_evidence_id(&global_deviceatlas.atlas,
+                        "user-agent");
                     global_deviceatlas.maxhdrlen = maxhdrlen;
                     thread_release();
                     free(cold);