blob: 0e4d5a7636086a4c98240d50b8b8484b8b9928a3 [file] [log] [blame]
David Carlier8167f302015-06-01 13:50:06 +02001#include <stdio.h>
2
3#include <common/cfgparse.h>
Willy Tarreau876054d2016-12-21 20:39:16 +01004#include <common/errors.h>
Willy Tarreau491cec22018-10-02 18:37:27 +02005#include <common/http.h>
Willy Tarreau0108d902018-11-25 19:14:37 +01006#include <common/initcall.h>
Willy Tarreau80713382018-11-26 10:19:54 +01007#include <types/global.h>
Willy Tarreauf63386a2015-06-01 15:39:50 +02008#include <proto/arg.h>
Willy Tarreau79e57332018-10-02 16:01:16 +02009#include <proto/http_fetch.h>
David CARLIER4de0eba2019-04-24 20:41:53 +010010#include <proto/http_htx.h>
David Carlier8167f302015-06-01 13:50:06 +020011#include <proto/log.h>
Christopher Fauletfc9cfe42019-07-16 14:54:53 +020012#include <proto/http_ana.h>
Willy Tarreauf63386a2015-06-01 15:39:50 +020013#include <proto/sample.h>
Willy Tarreaubee9dde2016-12-21 21:25:06 +010014#include <dac.h>
15
16static struct {
17 void *atlasimgptr;
18 char *jsonpath;
19 char *cookiename;
20 size_t cookienamelen;
21 da_atlas_t atlas;
22 da_evidence_id_t useragentid;
23 da_severity_t loglevel;
24 char separator;
25 unsigned char daset:1;
26} global_deviceatlas = {
27 .loglevel = 0,
28 .jsonpath = 0,
29 .cookiename = 0,
30 .cookienamelen = 0,
31 .useragentid = 0,
32 .daset = 0,
33 .separator = '|',
34};
David Carlier8167f302015-06-01 13:50:06 +020035
36static int da_json_file(char **args, int section_type, struct proxy *curpx,
37 struct proxy *defpx, const char *file, int line,
38 char **err)
39{
40 if (*(args[1]) == 0) {
41 memprintf(err, "deviceatlas json file : expects a json path.\n");
42 return -1;
43 }
Willy Tarreaubee9dde2016-12-21 21:25:06 +010044 global_deviceatlas.jsonpath = strdup(args[1]);
David Carlier8167f302015-06-01 13:50:06 +020045 return 0;
46}
47
48static int da_log_level(char **args, int section_type, struct proxy *curpx,
49 struct proxy *defpx, const char *file, int line,
50 char **err)
51{
52 int loglevel;
53 if (*(args[1]) == 0) {
54 memprintf(err, "deviceatlas log level : expects an integer argument.\n");
55 return -1;
56 }
57
58 loglevel = atol(args[1]);
59 if (loglevel < 0 || loglevel > 3) {
60 memprintf(err, "deviceatlas log level : expects a log level between 0 and 3, %s given.\n", args[1]);
61 } else {
Willy Tarreaubee9dde2016-12-21 21:25:06 +010062 global_deviceatlas.loglevel = (da_severity_t)loglevel;
David Carlier8167f302015-06-01 13:50:06 +020063 }
64
65 return 0;
66}
67
68static int da_property_separator(char **args, int section_type, struct proxy *curpx,
69 struct proxy *defpx, const char *file, int line,
70 char **err)
71{
72 if (*(args[1]) == 0) {
73 memprintf(err, "deviceatlas property separator : expects a character argument.\n");
74 return -1;
75 }
Willy Tarreaubee9dde2016-12-21 21:25:06 +010076 global_deviceatlas.separator = *args[1];
David Carlier8167f302015-06-01 13:50:06 +020077 return 0;
78}
79
David Carlier608c65a2015-09-25 14:16:30 +010080static int da_properties_cookie(char **args, int section_type, struct proxy *curpx,
81 struct proxy *defpx, const char *file, int line,
82 char **err)
83{
84 if (*(args[1]) == 0) {
85 memprintf(err, "deviceatlas cookie name : expects a string argument.\n");
86 return -1;
87 } else {
Willy Tarreaubee9dde2016-12-21 21:25:06 +010088 global_deviceatlas.cookiename = strdup(args[1]);
David Carlier608c65a2015-09-25 14:16:30 +010089 }
Willy Tarreaubee9dde2016-12-21 21:25:06 +010090 global_deviceatlas.cookienamelen = strlen(global_deviceatlas.cookiename);
David Carlier608c65a2015-09-25 14:16:30 +010091 return 0;
92}
93
David Carlier8167f302015-06-01 13:50:06 +020094static size_t da_haproxy_read(void *ctx, size_t len, char *buf)
95{
96 return fread(buf, 1, len, ctx);
97}
98
99static da_status_t da_haproxy_seek(void *ctx, off_t off)
100{
101 return fseek(ctx, off, SEEK_SET) != -1 ? DA_OK : DA_SYS;
102}
103
104static void da_haproxy_log(da_severity_t severity, da_status_t status,
105 const char *fmt, va_list args)
106{
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100107 if (global_deviceatlas.loglevel && severity <= global_deviceatlas.loglevel) {
David Carlier8167f302015-06-01 13:50:06 +0200108 char logbuf[256];
109 vsnprintf(logbuf, sizeof(logbuf), fmt, args);
Christopher Faulet767a84b2017-11-24 16:50:31 +0100110 ha_warning("deviceatlas : %s.\n", logbuf);
David Carlier8167f302015-06-01 13:50:06 +0200111 }
112}
113
David Carlier608c65a2015-09-25 14:16:30 +0100114#define DA_COOKIENAME_DEFAULT "DAPROPS"
115
Willy Tarreau876054d2016-12-21 20:39:16 +0100116/*
117 * module init / deinit functions. Returns 0 if OK, or a combination of ERR_*.
118 */
119static int init_deviceatlas(void)
David Carlier8167f302015-06-01 13:50:06 +0200120{
Willy Tarreau876054d2016-12-21 20:39:16 +0100121 int err_code = 0;
122
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100123 if (global_deviceatlas.jsonpath != 0) {
David Carlier8167f302015-06-01 13:50:06 +0200124 FILE *jsonp;
125 da_property_decl_t extraprops[] = {{0, 0}};
126 size_t atlasimglen;
127 da_status_t status;
128
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100129 jsonp = fopen(global_deviceatlas.jsonpath, "r");
David Carlier8167f302015-06-01 13:50:06 +0200130 if (jsonp == 0) {
Christopher Faulet767a84b2017-11-24 16:50:31 +0100131 ha_alert("deviceatlas : '%s' json file has invalid path or is not readable.\n",
132 global_deviceatlas.jsonpath);
Willy Tarreau876054d2016-12-21 20:39:16 +0100133 err_code |= ERR_ALERT | ERR_FATAL;
David Carlier8167f302015-06-01 13:50:06 +0200134 goto out;
135 }
136
137 da_init();
138 da_seterrorfunc(da_haproxy_log);
139 status = da_atlas_compile(jsonp, da_haproxy_read, da_haproxy_seek,
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100140 &global_deviceatlas.atlasimgptr, &atlasimglen);
David Carlier8167f302015-06-01 13:50:06 +0200141 fclose(jsonp);
142 if (status != DA_OK) {
Christopher Faulet767a84b2017-11-24 16:50:31 +0100143 ha_alert("deviceatlas : '%s' json file is invalid.\n",
144 global_deviceatlas.jsonpath);
Willy Tarreau876054d2016-12-21 20:39:16 +0100145 err_code |= ERR_ALERT | ERR_FATAL;
David Carlier8167f302015-06-01 13:50:06 +0200146 goto out;
147 }
148
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100149 status = da_atlas_open(&global_deviceatlas.atlas, extraprops,
150 global_deviceatlas.atlasimgptr, atlasimglen);
David Carlier8167f302015-06-01 13:50:06 +0200151
152 if (status != DA_OK) {
Christopher Faulet767a84b2017-11-24 16:50:31 +0100153 ha_alert("deviceatlas : data could not be compiled.\n");
Willy Tarreau876054d2016-12-21 20:39:16 +0100154 err_code |= ERR_ALERT | ERR_FATAL;
David Carlier8167f302015-06-01 13:50:06 +0200155 goto out;
156 }
157
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100158 if (global_deviceatlas.cookiename == 0) {
159 global_deviceatlas.cookiename = strdup(DA_COOKIENAME_DEFAULT);
160 global_deviceatlas.cookienamelen = strlen(global_deviceatlas.cookiename);
David Carlier608c65a2015-09-25 14:16:30 +0100161 }
162
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100163 global_deviceatlas.useragentid = da_atlas_header_evidence_id(&global_deviceatlas.atlas,
David Carlier8167f302015-06-01 13:50:06 +0200164 "user-agent");
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100165 global_deviceatlas.daset = 1;
David Carlier8167f302015-06-01 13:50:06 +0200166
167 fprintf(stdout, "Deviceatlas module loaded.\n");
168 }
169
170out:
Willy Tarreau876054d2016-12-21 20:39:16 +0100171 return err_code;
David Carlier8167f302015-06-01 13:50:06 +0200172}
173
Willy Tarreaub149eed2016-12-21 21:03:49 +0100174static void deinit_deviceatlas(void)
David Carlier8167f302015-06-01 13:50:06 +0200175{
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100176 if (global_deviceatlas.jsonpath != 0) {
177 free(global_deviceatlas.jsonpath);
David Carlier8167f302015-06-01 13:50:06 +0200178 }
179
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100180 if (global_deviceatlas.daset == 1) {
181 free(global_deviceatlas.cookiename);
182 da_atlas_close(&global_deviceatlas.atlas);
183 free(global_deviceatlas.atlasimgptr);
David Carlier8167f302015-06-01 13:50:06 +0200184 }
185
186 da_fini();
187}
188
David Carlier608c65a2015-09-25 14:16:30 +0100189static int da_haproxy(const struct arg *args, struct sample *smp, da_deviceinfo_t *devinfo)
David Carlier8167f302015-06-01 13:50:06 +0200190{
Willy Tarreau83061a82018-07-13 11:56:34 +0200191 struct buffer *tmp;
David Carlier8167f302015-06-01 13:50:06 +0200192 da_propid_t prop, *pprop;
David Carlier8167f302015-06-01 13:50:06 +0200193 da_status_t status;
David Carlier608c65a2015-09-25 14:16:30 +0100194 da_type_t proptype;
195 const char *propname;
David Carlier8167f302015-06-01 13:50:06 +0200196 int i;
197
David Carlier8167f302015-06-01 13:50:06 +0200198 tmp = get_trash_chunk();
199 chunk_reset(tmp);
200
Willy Tarreau843b7cb2018-07-13 10:54:26 +0200201 propname = (const char *) args[0].data.str.area;
David Carlier8167f302015-06-01 13:50:06 +0200202 i = 0;
203
Willy Tarreau843b7cb2018-07-13 10:54:26 +0200204 for (; propname != 0; i ++,
205 propname = (const char *) args[i].data.str.area) {
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100206 status = da_atlas_getpropid(&global_deviceatlas.atlas,
David Carlier8167f302015-06-01 13:50:06 +0200207 propname, &prop);
208 if (status != DA_OK) {
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100209 chunk_appendf(tmp, "%c", global_deviceatlas.separator);
David Carlier8167f302015-06-01 13:50:06 +0200210 continue;
211 }
212 pprop = &prop;
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100213 da_atlas_getproptype(&global_deviceatlas.atlas, *pprop, &proptype);
David Carlier8167f302015-06-01 13:50:06 +0200214
215 switch (proptype) {
216 case DA_TYPE_BOOLEAN: {
217 bool val;
David Carlier608c65a2015-09-25 14:16:30 +0100218 status = da_getpropboolean(devinfo, *pprop, &val);
David Carlier8167f302015-06-01 13:50:06 +0200219 if (status == DA_OK) {
220 chunk_appendf(tmp, "%d", val);
221 }
222 break;
223 }
224 case DA_TYPE_INTEGER:
225 case DA_TYPE_NUMBER: {
226 long val;
David Carlier608c65a2015-09-25 14:16:30 +0100227 status = da_getpropinteger(devinfo, *pprop, &val);
David Carlier8167f302015-06-01 13:50:06 +0200228 if (status == DA_OK) {
229 chunk_appendf(tmp, "%ld", val);
230 }
231 break;
232 }
233 case DA_TYPE_STRING: {
234 const char *val;
David Carlier608c65a2015-09-25 14:16:30 +0100235 status = da_getpropstring(devinfo, *pprop, &val);
David Carlier8167f302015-06-01 13:50:06 +0200236 if (status == DA_OK) {
237 chunk_appendf(tmp, "%s", val);
238 }
239 break;
David Carlier608c65a2015-09-25 14:16:30 +0100240 }
David Carlier8167f302015-06-01 13:50:06 +0200241 default:
242 break;
243 }
244
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100245 chunk_appendf(tmp, "%c", global_deviceatlas.separator);
David Carlier8167f302015-06-01 13:50:06 +0200246 }
247
David Carlier608c65a2015-09-25 14:16:30 +0100248 da_close(devinfo);
David Carlier8167f302015-06-01 13:50:06 +0200249
Willy Tarreau843b7cb2018-07-13 10:54:26 +0200250 if (tmp->data) {
251 --tmp->data;
252 tmp->area[tmp->data] = 0;
David Carlier8167f302015-06-01 13:50:06 +0200253 }
254
Willy Tarreau843b7cb2018-07-13 10:54:26 +0200255 smp->data.u.str.area = tmp->area;
256 smp->data.u.str.data = tmp->data;
David Carlier7df41852019-07-10 21:19:24 +0100257 smp->data.type = SMP_T_STR;
David Carlier8167f302015-06-01 13:50:06 +0200258
259 return 1;
260}
261
David Carlier608c65a2015-09-25 14:16:30 +0100262static int da_haproxy_conv(const struct arg *args, struct sample *smp, void *private)
263{
264 da_deviceinfo_t devinfo;
265 da_status_t status;
266 const char *useragent;
267 char useragentbuf[1024] = { 0 };
268 int i;
269
Willy Tarreau843b7cb2018-07-13 10:54:26 +0200270 if (global_deviceatlas.daset == 0 || smp->data.u.str.data == 0) {
David Carlier608c65a2015-09-25 14:16:30 +0100271 return 1;
272 }
273
Willy Tarreau843b7cb2018-07-13 10:54:26 +0200274 i = smp->data.u.str.data > sizeof(useragentbuf) ? sizeof(useragentbuf) : smp->data.u.str.data;
275 memcpy(useragentbuf, smp->data.u.str.area, i - 1);
David Carlier608c65a2015-09-25 14:16:30 +0100276 useragentbuf[i - 1] = 0;
277
278 useragent = (const char *)useragentbuf;
279
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100280 status = da_search(&global_deviceatlas.atlas, &devinfo,
281 global_deviceatlas.useragentid, useragent, 0);
David Carlier608c65a2015-09-25 14:16:30 +0100282
283 return status != DA_OK ? 0 : da_haproxy(args, smp, &devinfo);
284}
285
286#define DA_MAX_HEADERS 24
287
288static int da_haproxy_fetch(const struct arg *args, struct sample *smp, const char *kw, void *private)
289{
David Carlier608c65a2015-09-25 14:16:30 +0100290 da_evidence_t ev[DA_MAX_HEADERS];
291 da_deviceinfo_t devinfo;
292 da_status_t status;
David CARLIER4de0eba2019-04-24 20:41:53 +0100293 struct channel *chn;
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200294 struct htx *htx;
295 struct htx_blk *blk;
David Carlier608c65a2015-09-25 14:16:30 +0100296 char vbuf[DA_MAX_HEADERS][1024] = {{ 0 }};
297 int i, nbh = 0;
298
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100299 if (global_deviceatlas.daset == 0) {
David CARLIER4de0eba2019-04-24 20:41:53 +0100300 return 0;
David Carlier608c65a2015-09-25 14:16:30 +0100301 }
302
David CARLIER4de0eba2019-04-24 20:41:53 +0100303 chn = (smp->strm ? &smp->strm->req : NULL);
Christopher Fauletd1185cc2020-05-05 11:49:57 +0200304 htx = smp_prefetch_htx(smp, chn, NULL, 1);
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200305 if (!htx)
306 return 0;
David Carlier608c65a2015-09-25 14:16:30 +0100307
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200308 i = 0;
309 for (blk = htx_get_first_blk(htx); nbh < DA_MAX_HEADERS && blk; blk = htx_get_next_blk(htx, blk)) {
310 size_t vlen;
311 char *pval;
312 da_evidence_id_t evid;
313 enum htx_blk_type type;
314 struct ist n, v;
315 char hbuf[24] = { 0 };
316 char tval[1024] = { 0 };
David Carlier608c65a2015-09-25 14:16:30 +0100317
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200318 type = htx_get_blk_type(blk);
David Carlier608c65a2015-09-25 14:16:30 +0100319
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200320 if (type == HTX_BLK_HDR) {
321 n = htx_get_blk_name(htx, blk);
322 v = htx_get_blk_value(htx, blk);
323 } else if (type == HTX_BLK_EOH) {
324 break;
325 } else {
326 continue;
327 }
David Carlier608c65a2015-09-25 14:16:30 +0100328
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200329 /* The HTTP headers used by the DeviceAtlas API are not longer */
330 if (n.len >= sizeof(hbuf)) {
331 continue;
David Carlier608c65a2015-09-25 14:16:30 +0100332 }
333
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200334 memcpy(hbuf, n.ptr, n.len);
335 hbuf[n.len] = 0;
336 pval = v.ptr;
337 vlen = v.len;
338 evid = -1;
339 i = v.len > sizeof(tval) - 1 ? sizeof(tval) - 1 : v.len;
340 memcpy(tval, v.ptr, i);
341 tval[i] = 0;
342 pval = tval;
David CARLIER4de0eba2019-04-24 20:41:53 +0100343
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200344 if (strcasecmp(hbuf, "Accept-Language") == 0) {
345 evid = da_atlas_accept_language_evidence_id(&global_deviceatlas.atlas);
346 } else if (strcasecmp(hbuf, "Cookie") == 0) {
347 char *p, *eval;
348 size_t pl;
David CARLIER4de0eba2019-04-24 20:41:53 +0100349
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200350 eval = pval + vlen;
351 /**
352 * The cookie value, if it exists, is located between the current header's
353 * value position and the next one
354 */
355 if (http_extract_cookie_value(pval, eval, global_deviceatlas.cookiename,
356 global_deviceatlas.cookienamelen, 1, &p, &pl) == NULL) {
David CARLIER4de0eba2019-04-24 20:41:53 +0100357 continue;
358 }
359
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200360 vlen -= global_deviceatlas.cookienamelen - 1;
361 pval = p;
362 evid = da_atlas_clientprop_evidence_id(&global_deviceatlas.atlas);
363 } else {
364 evid = da_atlas_header_evidence_id(&global_deviceatlas.atlas, hbuf);
365 }
David CARLIER4de0eba2019-04-24 20:41:53 +0100366
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200367 if (evid == -1) {
368 continue;
David CARLIER4de0eba2019-04-24 20:41:53 +0100369 }
Christopher Faulet6d1dd462019-07-15 14:36:03 +0200370
371 i = vlen > sizeof(vbuf[nbh]) - 1 ? sizeof(vbuf[nbh]) - 1 : vlen;
372 memcpy(vbuf[nbh], pval, i);
373 vbuf[nbh][i] = 0;
374 ev[nbh].key = evid;
375 ev[nbh].value = vbuf[nbh];
376 ++ nbh;
David Carlier608c65a2015-09-25 14:16:30 +0100377 }
378
Willy Tarreaubee9dde2016-12-21 21:25:06 +0100379 status = da_searchv(&global_deviceatlas.atlas, &devinfo,
David Carlier608c65a2015-09-25 14:16:30 +0100380 ev, nbh);
381
382 return status != DA_OK ? 0 : da_haproxy(args, smp, &devinfo);
383}
384
Willy Tarreau0d74f772015-06-01 15:42:29 +0200385static struct cfg_kw_list dacfg_kws = {{ }, {
386 { CFG_GLOBAL, "deviceatlas-json-file", da_json_file },
David CARLIER4de0eba2019-04-24 20:41:53 +0100387 { CFG_GLOBAL, "deviceatlas-log-level", da_log_level },
388 { CFG_GLOBAL, "deviceatlas-property-separator", da_property_separator },
389 { CFG_GLOBAL, "deviceatlas-properties-cookie", da_properties_cookie },
390 { 0, NULL, NULL },
Willy Tarreau0d74f772015-06-01 15:42:29 +0200391}};
392
Willy Tarreau0108d902018-11-25 19:14:37 +0100393INITCALL1(STG_REGISTER, cfg_register_keywords, &dacfg_kws);
394
Willy Tarreauf63386a2015-06-01 15:39:50 +0200395/* Note: must not be declared <const> as its list will be overwritten */
David Carlier608c65a2015-09-25 14:16:30 +0100396static struct sample_fetch_kw_list fetch_kws = {ILH, {
David Carlier840b0242016-03-16 10:09:55 +0000397 { "da-csv-fetch", da_haproxy_fetch, ARG12(1,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_USE_HRQHV },
David CARLIER4de0eba2019-04-24 20:41:53 +0100398 { NULL, NULL, 0, 0, 0 },
David Carlier608c65a2015-09-25 14:16:30 +0100399}};
400
Willy Tarreau0108d902018-11-25 19:14:37 +0100401INITCALL1(STG_REGISTER, sample_register_fetches, &fetch_kws);
402
David Carlier608c65a2015-09-25 14:16:30 +0100403/* Note: must not be declared <const> as its list will be overwritten */
Willy Tarreauf63386a2015-06-01 15:39:50 +0200404static struct sample_conv_kw_list conv_kws = {ILH, {
David Carlier840b0242016-03-16 10:09:55 +0000405 { "da-csv-conv", da_haproxy_conv, ARG12(1,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR,STR), NULL, SMP_T_STR, SMP_T_STR },
David CARLIER4de0eba2019-04-24 20:41:53 +0100406 { NULL, NULL, 0, 0, 0 },
Willy Tarreauf63386a2015-06-01 15:39:50 +0200407}};
408
David Carlier0470d702019-04-26 12:02:28 +0000409static void da_haproxy_register_build_options()
410{
411 char *ptr = NULL;
412
413#ifdef MOBI_DA_DUMMY_LIBRARY
414 memprintf(&ptr, "Built with DeviceAtlas support (dummy library only).");
415#else
416 memprintf(&ptr, "Built with DeviceAtlas support (library version %u.%u).", MOBI_DA_MAJOR, MOBI_DA_MINOR);
417#endif
418 hap_register_build_opts(ptr, 1);
419}
420
Willy Tarreau0108d902018-11-25 19:14:37 +0100421INITCALL1(STG_REGISTER, sample_register_convs, &conv_kws);
422
Willy Tarreau172f5ce2018-11-26 11:21:50 +0100423REGISTER_POST_CHECK(init_deviceatlas);
424REGISTER_POST_DEINIT(deinit_deviceatlas);
David Carlier0470d702019-04-26 12:02:28 +0000425INITCALL0(STG_REGISTER, da_haproxy_register_build_options);