diff --git a/include/proto/payload.h b/include/proto/payload.h index 338ebc60d..5e0147b34 100644 --- a/include/proto/payload.h +++ b/include/proto/payload.h @@ -28,7 +28,7 @@ #include #include -int smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt, const struct arg *args, struct sample *smp); +int smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt, const struct arg *args, struct sample *smp, const char *kw); #endif /* _PROTO_PROTO_PAYLOAD_H */ diff --git a/include/types/sample.h b/include/types/sample.h index 9821dbcf9..3dfaec960 100644 --- a/include/types/sample.h +++ b/include/types/sample.h @@ -263,7 +263,8 @@ struct sample_fetch { void *l7, unsigned int opt, /* fetch options (SMP_OPT_*) */ const struct arg *arg_p, - struct sample *smp); /* fetch processing function */ + struct sample *smp, + const char *kw); /* fetch processing function */ unsigned int arg_mask; /* arguments (ARG*()) */ int (*val_args)(struct arg *arg_p, char **err_msg); /* argument validation function */ diff --git a/src/acl.c b/src/acl.c index b069d39c8..d9475916e 100644 --- a/src/acl.c +++ b/src/acl.c @@ -1743,7 +1743,7 @@ int acl_exec_cond(struct acl_cond *cond, struct proxy *px, struct session *l4, v /* we need to reset context and flags */ memset(&smp, 0, sizeof(smp)); fetch_next: - if (!expr->smp->process(px, l4, l7, opt, expr->args, &smp)) { + if (!expr->smp->process(px, l4, l7, opt, expr->args, &smp, expr->smp->kw)) { /* maybe we could not fetch because of missing data */ if (smp.flags & SMP_F_MAY_CHANGE && !(opt & SMP_OPT_FINAL)) acl_res |= ACL_PAT_MISS; diff --git a/src/backend.c b/src/backend.c index d677ab2a5..ae3e2b1c2 100644 --- a/src/backend.c +++ b/src/backend.c @@ -424,7 +424,7 @@ struct server *get_server_rch(struct session *s) b_rew(s->req->buf, rewind = s->req->buf->o); - ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp); + ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp, NULL); len = smp.data.str.len; b_adv(s->req->buf, rewind); @@ -1132,7 +1132,7 @@ int tcp_persist_rdp_cookie(struct session *s, struct channel *req, int an_bit) args[0].data.str.len = s->be->rdp_cookie_len; args[1].type = ARGT_STOP; - ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp); + ret = smp_fetch_rdp_cookie(px, s, NULL, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, args, &smp, NULL); if (ret == 0 || (smp.flags & SMP_F_MAY_CHANGE) || smp.data.str.len == 0) goto no_cookie; @@ -1379,7 +1379,7 @@ int backend_parse_balance(const char **args, char **err, struct proxy *curproxy) */ static int smp_fetch_nbsrv(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; @@ -1402,7 +1402,7 @@ smp_fetch_nbsrv(struct proxy *px, struct session *l4, void *l7, unsigned int opt */ static int smp_fetch_srv_is_up(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct server *srv = args->data.srv; @@ -1422,7 +1422,7 @@ smp_fetch_srv_is_up(struct proxy *px, struct session *l4, void *l7, unsigned int */ static int smp_fetch_connslots(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct server *iterator; @@ -1450,7 +1450,7 @@ smp_fetch_connslots(struct proxy *px, struct session *l4, void *l7, unsigned int /* set temp integer to the id of the backend */ static int smp_fetch_be_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TXN; smp->type = SMP_T_UINT; @@ -1461,7 +1461,7 @@ smp_fetch_be_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt /* set temp integer to the id of the server */ static int smp_fetch_srv_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!objt_server(l4->target)) return 0; @@ -1478,7 +1478,7 @@ smp_fetch_srv_id(struct proxy *px, struct session *l4, void *l7, unsigned int op */ static int smp_fetch_be_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; @@ -1492,7 +1492,7 @@ smp_fetch_be_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_be_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; @@ -1506,7 +1506,7 @@ smp_fetch_be_conn(struct proxy *px, struct session *l4, void *l7, unsigned int o */ static int smp_fetch_queue_size(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; @@ -1524,7 +1524,7 @@ smp_fetch_queue_size(struct proxy *px, struct session *l4, void *l7, unsigned in */ static int smp_fetch_avg_queue_size(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { int nbsrv; @@ -1553,7 +1553,7 @@ smp_fetch_avg_queue_size(struct proxy *px, struct session *l4, void *l7, unsigne */ static int smp_fetch_srv_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; @@ -1567,7 +1567,7 @@ smp_fetch_srv_conn(struct proxy *px, struct session *l4, void *l7, unsigned int */ static int smp_fetch_srv_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; diff --git a/src/compression.c b/src/compression.c index 249006109..27ba4b4b0 100644 --- a/src/compression.c +++ b/src/compression.c @@ -613,7 +613,7 @@ int deflate_end(struct comp_ctx **comp_ctx) /* boolean, returns true if compression is used (either gzip or deflate) in the response */ static int smp_fetch_res_comp(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->type = SMP_T_BOOL; smp->data.uint = (l4->comp_algo != NULL); @@ -623,7 +623,7 @@ smp_fetch_res_comp(struct proxy *px, struct session *l4, void *l7, unsigned int /* string, returns algo */ static int smp_fetch_res_comp_algo(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->comp_algo) return 0; diff --git a/src/frontend.c b/src/frontend.c index 58236ba43..104805214 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -216,7 +216,7 @@ int frontend_accept(struct session *s) /* set temp integer to the id of the frontend */ static int smp_fetch_fe_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_SESS; smp->type = SMP_T_UINT; @@ -230,7 +230,7 @@ smp_fetch_fe_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt */ static int smp_fetch_fe_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; @@ -244,7 +244,7 @@ smp_fetch_fe_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_fe_conn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; diff --git a/src/listener.c b/src/listener.c index ce8b4f2be..afd6ae225 100644 --- a/src/listener.c +++ b/src/listener.c @@ -488,7 +488,7 @@ void bind_dump_kws(char **out) /* set temp integer to the number of connexions to the same listening socket */ static int smp_fetch_dconn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->type = SMP_T_UINT; smp->data.uint = l4->listener->nbconn; @@ -498,7 +498,7 @@ smp_fetch_dconn(struct proxy *px, struct session *l4, void *l7, unsigned int opt /* set temp integer to the id of the socket (listener) */ static int smp_fetch_so_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->type = SMP_T_UINT; smp->data.uint = l4->listener->luid; diff --git a/src/payload.c b/src/payload.c index bc54e114a..d5f95a46c 100644 --- a/src/payload.c +++ b/src/payload.c @@ -29,7 +29,7 @@ */ static int smp_fetch_wait_end(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!(opt & SMP_OPT_FINAL)) { smp->flags |= SMP_F_MAY_CHANGE; @@ -43,7 +43,7 @@ smp_fetch_wait_end(struct proxy *px, struct session *s, void *l7, unsigned int o /* return the number of bytes in the request buffer */ static int smp_fetch_req_len(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!s || !s->req) return 0; @@ -57,7 +57,7 @@ smp_fetch_req_len(struct proxy *px, struct session *s, void *l7, unsigned int op /* returns the type of SSL hello message (mainly used to detect an SSL hello) */ static int smp_fetch_ssl_hello_type(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { int hs_len; int hs_type, bleft; @@ -126,7 +126,7 @@ smp_fetch_ssl_hello_type(struct proxy *px, struct session *s, void *l7, unsigned */ static int smp_fetch_req_ssl_ver(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { int version, bleft, msg_len; const unsigned char *data; @@ -262,7 +262,7 @@ smp_fetch_req_ssl_ver(struct proxy *px, struct session *s, void *l7, unsigned in */ static int smp_fetch_ssl_hello_sni(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { int hs_len, ext_len, bleft; struct channel *chn; @@ -401,7 +401,7 @@ smp_fetch_ssl_hello_sni(struct proxy *px, struct session *s, void *l7, unsigned */ int smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { int bleft; const unsigned char *data; @@ -490,11 +490,11 @@ smp_fetch_rdp_cookie(struct proxy *px, struct session *s, void *l7, unsigned int /* returns either 1 or 0 depending on whether an RDP cookie is found or not */ static int smp_fetch_rdp_cookie_cnt(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { int ret; - ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp); + ret = smp_fetch_rdp_cookie(px, s, l7, opt, args, smp, kw); if (smp->flags & SMP_F_MAY_CHANGE) return 0; @@ -508,7 +508,7 @@ smp_fetch_rdp_cookie_cnt(struct proxy *px, struct session *s, void *l7, unsigned /* extracts part of a payload with offset and length at a given position */ static int smp_fetch_payload_lv(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *arg_p, struct sample *smp) + const struct arg *arg_p, struct sample *smp, const char *kw) { unsigned int len_offset = arg_p[0].data.uint; unsigned int len_size = arg_p[1].data.uint; @@ -566,7 +566,7 @@ smp_fetch_payload_lv(struct proxy *px, struct session *s, void *l7, unsigned int /* extracts some payload at a fixed position and length */ static int smp_fetch_payload(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *arg_p, struct sample *smp) + const struct arg *arg_p, struct sample *smp, const char *kw) { unsigned int buf_offset = arg_p[0].data.uint; unsigned int buf_size = arg_p[1].data.uint; diff --git a/src/proto_http.c b/src/proto_http.c index ebb7556a9..3ef64728b 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -9029,7 +9029,7 @@ static int acl_parse_meth(const char **text, struct acl_pattern *pattern, int *o */ static int smp_fetch_meth(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { int meth; struct http_txn *txn = l7; @@ -9081,7 +9081,7 @@ static int acl_match_meth(struct sample *smp, struct acl_pattern *pattern) static int smp_fetch_rqver(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; char *ptr; @@ -9106,7 +9106,7 @@ smp_fetch_rqver(struct proxy *px, struct session *l4, void *l7, unsigned int opt static int smp_fetch_stver(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; char *ptr; @@ -9135,7 +9135,7 @@ smp_fetch_stver(struct proxy *px, struct session *l4, void *l7, unsigned int opt /* 3. Check on Status Code. We manipulate integers here. */ static int smp_fetch_stcode(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; char *ptr; @@ -9158,7 +9158,7 @@ smp_fetch_stcode(struct proxy *px, struct session *l4, void *l7, unsigned int op /* 4. Check on URL/URI. A pointer to the URI is stored. */ static int smp_fetch_url(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; @@ -9173,7 +9173,7 @@ smp_fetch_url(struct proxy *px, struct session *l4, void *l7, unsigned int opt, static int smp_fetch_url_ip(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; @@ -9199,7 +9199,7 @@ smp_fetch_url_ip(struct proxy *px, struct session *l4, void *l7, unsigned int op static int smp_fetch_url_port(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; @@ -9226,7 +9226,7 @@ smp_fetch_url_port(struct proxy *px, struct session *l4, void *l7, unsigned int */ static int smp_fetch_fhdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; struct hdr_idx *idx = &txn->hdr_idx; @@ -9282,7 +9282,7 @@ smp_fetch_fhdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt, */ static int smp_fetch_fhdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; struct hdr_idx *idx = &txn->hdr_idx; @@ -9314,7 +9314,7 @@ smp_fetch_fhdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int */ static int smp_fetch_hdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; struct hdr_idx *idx = &txn->hdr_idx; @@ -9369,7 +9369,7 @@ smp_fetch_hdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt, */ static int smp_fetch_hdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; struct hdr_idx *idx = &txn->hdr_idx; @@ -9400,9 +9400,9 @@ smp_fetch_hdr_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int o */ static int smp_fetch_hdr_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { - int ret = smp_fetch_hdr(px, l4, l7, opt, args, smp); + int ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw); if (ret > 0) { smp->type = SMP_T_UINT; @@ -9418,11 +9418,11 @@ smp_fetch_hdr_val(struct proxy *px, struct session *l4, void *l7, unsigned int o */ static int smp_fetch_hdr_ip(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { int ret; - while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp)) > 0) { + while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp, kw)) > 0) { if (url2ipv4((char *)smp->data.str.str, &smp->data.ipv4)) { smp->type = SMP_T_IPV4; break; @@ -9450,7 +9450,7 @@ smp_fetch_hdr_ip(struct proxy *px, struct session *l4, void *l7, unsigned int op */ static int smp_fetch_path(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; char *ptr, *end; @@ -9482,7 +9482,7 @@ smp_fetch_path(struct proxy *px, struct session *l4, void *l7, unsigned int opt, */ static int smp_fetch_base(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; char *ptr, *end, *beg; @@ -9493,7 +9493,7 @@ smp_fetch_base(struct proxy *px, struct session *l4, void *l7, unsigned int opt, ctx.idx = 0; if (!http_find_header2("Host", 4, txn->req.chn->buf->p + txn->req.sol, &txn->hdr_idx, &ctx) || !ctx.vlen) - return smp_fetch_path(px, l4, l7, opt, args, smp); + return smp_fetch_path(px, l4, l7, opt, args, smp, kw); /* OK we have the header value in ctx.line+ctx.val for ctx.vlen bytes */ memcpy(trash.str, ctx.line + ctx.val, ctx.vlen); @@ -9528,7 +9528,7 @@ smp_fetch_base(struct proxy *px, struct session *l4, void *l7, unsigned int opt, */ static int smp_fetch_base32(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; struct hdr_ctx ctx; @@ -9576,11 +9576,11 @@ smp_fetch_base32(struct proxy *px, struct session *l4, void *l7, unsigned int op */ static int smp_fetch_base32_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct chunk *temp; - if (!smp_fetch_base32(px, l4, l7, opt, args, smp)) + if (!smp_fetch_base32(px, l4, l7, opt, args, smp, kw)) return 0; temp = get_trash_chunk(); @@ -9607,7 +9607,7 @@ smp_fetch_base32_src(struct proxy *px, struct session *l4, void *l7, unsigned in static int smp_fetch_proto_http(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { /* Note: hdr_idx.v cannot be NULL in this ACL because the ACL is tagged * as a layer7 ACL, which involves automatic allocation of hdr_idx. @@ -9623,7 +9623,7 @@ smp_fetch_proto_http(struct proxy *px, struct session *l4, void *l7, unsigned in /* return a valid test if the current request is the first one on the connection */ static int smp_fetch_http_first_req(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!s) return 0; @@ -9636,7 +9636,7 @@ smp_fetch_http_first_req(struct proxy *px, struct session *s, void *l7, unsigned /* Accepts exactly 1 argument of type userlist */ static int smp_fetch_http_auth(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!args || args->type != ARGT_USR) @@ -9655,7 +9655,7 @@ smp_fetch_http_auth(struct proxy *px, struct session *l4, void *l7, unsigned int /* Accepts exactly 1 argument of type userlist */ static int smp_fetch_http_auth_grp(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!args || args->type != ARGT_USR) @@ -9789,7 +9789,7 @@ extract_cookie_value(char *hdr, const char *hdr_end, */ static int smp_fetch_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; struct hdr_idx *idx = &txn->hdr_idx; @@ -9887,7 +9887,7 @@ smp_fetch_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int op */ static int smp_fetch_cookie_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct http_txn *txn = l7; struct hdr_idx *idx = &txn->hdr_idx; @@ -9952,9 +9952,9 @@ smp_fetch_cookie_cnt(struct proxy *px, struct session *l4, void *l7, unsigned in */ static int smp_fetch_cookie_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { - int ret = smp_fetch_cookie(px, l4, l7, opt, args, smp); + int ret = smp_fetch_cookie(px, l4, l7, opt, args, smp, kw); if (ret > 0) { smp->type = SMP_T_UINT; @@ -10057,7 +10057,7 @@ find_url_param_value(char* path, size_t path_l, static int smp_fetch_url_param(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { char delim = '?'; struct http_txn *txn = l7; @@ -10088,9 +10088,9 @@ smp_fetch_url_param(struct proxy *px, struct session *l4, void *l7, unsigned int */ static int smp_fetch_url_param_val(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { - int ret = smp_fetch_url_param(px, l4, l7, opt, args, smp); + int ret = smp_fetch_url_param(px, l4, l7, opt, args, smp, kw); if (ret > 0) { smp->type = SMP_T_UINT; diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 4357b0407..fe4a0d2b5 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -1539,7 +1539,7 @@ static int tcp_parse_tcp_req(char **args, int section_type, struct proxy *curpx, /* fetch the connection's source IPv4/IPv6 address */ static int smp_fetch_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { switch (l4->si[0].conn->addr.from.ss_family) { case AF_INET: @@ -1561,7 +1561,7 @@ smp_fetch_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt, /* set temp integer to the connection's source port */ static int smp_fetch_sport(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->type = SMP_T_UINT; if (!(smp->data.uint = get_host_port(&l4->si[0].conn->addr.from))) @@ -1574,7 +1574,7 @@ smp_fetch_sport(struct proxy *px, struct session *l4, void *l7, unsigned int opt /* fetch the connection's destination IPv4/IPv6 address */ static int smp_fetch_dst(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { conn_get_to_addr(l4->si[0].conn); @@ -1598,7 +1598,7 @@ smp_fetch_dst(struct proxy *px, struct session *l4, void *l7, unsigned int opt, /* set temp integer to the frontend connexion's destination port */ static int smp_fetch_dport(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { conn_get_to_addr(l4->si[0].conn); diff --git a/src/sample.c b/src/sample.c index f8fa717cd..1a2ab478a 100644 --- a/src/sample.c +++ b/src/sample.c @@ -775,7 +775,7 @@ struct sample *sample_process(struct proxy *px, struct session *l4, void *l7, p->flags = 0; } - if (!expr->fetch->process(px, l4, l7, opt, expr->arg_p, p)) + if (!expr->fetch->process(px, l4, l7, opt, expr->arg_p, p, expr->fetch->kw)) return NULL; if ((p->flags & SMP_F_MAY_CHANGE) && !(opt & SMP_OPT_FINAL)) @@ -1088,7 +1088,7 @@ static int sample_conv_ipmask(const struct arg *arg_p, struct sample *smp) /* force TRUE to be returned at the fetch level */ static int smp_fetch_true(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->type = SMP_T_BOOL; smp->data.uint = 1; @@ -1098,7 +1098,7 @@ smp_fetch_true(struct proxy *px, struct session *s, void *l7, unsigned int opt, /* force FALSE to be returned at the fetch level */ static int smp_fetch_false(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->type = SMP_T_BOOL; smp->data.uint = 0; @@ -1108,7 +1108,7 @@ smp_fetch_false(struct proxy *px, struct session *s, void *l7, unsigned int opt, /* retrieve environment variable $1 as a string */ static int smp_fetch_env(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { char *env; @@ -1130,7 +1130,7 @@ smp_fetch_env(struct proxy *px, struct session *s, void *l7, unsigned int opt, */ static int smp_fetch_date(struct proxy *px, struct session *s, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->data.uint = date.tv_sec; diff --git a/src/session.c b/src/session.c index 0a6b13025..2fc2dcb49 100644 --- a/src/session.c +++ b/src/session.c @@ -2581,7 +2581,7 @@ void session_shutdown(struct session *session, int why) /* set return a boolean indicating if sc0 is currently being tracked or not */ static int smp_fetch_sc0_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_BOOL; @@ -2592,7 +2592,7 @@ smp_fetch_sc0_tracked(struct proxy *px, struct session *l4, void *l7, unsigned i /* set return a boolean indicating if sc1 is currently being tracked or not */ static int smp_fetch_sc1_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_BOOL; @@ -2603,7 +2603,7 @@ smp_fetch_sc1_tracked(struct proxy *px, struct session *l4, void *l7, unsigned i /* set return a boolean indicating if sc2 is currently being tracked or not */ static int smp_fetch_sc2_tracked(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_BOOL; @@ -2632,7 +2632,7 @@ smp_fetch_get_gpc0(struct stktable *table, struct sample *smp, struct stksess *t */ static int smp_fetch_sc0_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -2644,7 +2644,7 @@ smp_fetch_sc0_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc1_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -2656,7 +2656,7 @@ smp_fetch_sc1_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc2_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -2669,7 +2669,7 @@ smp_fetch_sc2_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_get_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -2703,7 +2703,7 @@ smp_fetch_gpc0_rate(struct stktable *table, struct sample *smp, struct stksess * */ static int smp_fetch_sc0_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -2715,7 +2715,7 @@ smp_fetch_sc0_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc1_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -2727,7 +2727,7 @@ smp_fetch_sc1_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc2_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -2740,7 +2740,7 @@ smp_fetch_sc2_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_gpc0_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -2787,7 +2787,7 @@ smp_fetch_inc_gpc0(struct stktable *table, struct sample *smp, struct stksess *t */ static int smp_fetch_sc0_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -2799,7 +2799,7 @@ smp_fetch_sc0_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc1_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -2811,7 +2811,7 @@ smp_fetch_sc1_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc2_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -2824,7 +2824,7 @@ smp_fetch_sc2_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_inc_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -2860,7 +2860,7 @@ smp_fetch_clr_gpc0(struct stktable *table, struct sample *smp, struct stksess *t */ static int smp_fetch_sc0_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -2872,7 +2872,7 @@ smp_fetch_sc0_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc1_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -2884,7 +2884,7 @@ smp_fetch_sc1_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc2_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -2897,7 +2897,7 @@ smp_fetch_sc2_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_clr_gpc0(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -2928,7 +2928,7 @@ smp_fetch_conn_cnt(struct stktable *table, struct sample *smp, struct stksess *t /* set temp integer to the cumulated number of connections from the session's tracked FE counters */ static int smp_fetch_sc0_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -2939,7 +2939,7 @@ smp_fetch_sc0_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned /* set temp integer to the cumulated number of connections from the session's tracked BE counters */ static int smp_fetch_sc1_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -2950,7 +2950,7 @@ smp_fetch_sc1_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned /* set temp integer to the cumulated number of connections from the session's tracked BE counters */ static int smp_fetch_sc2_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -2964,7 +2964,7 @@ smp_fetch_sc2_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -2998,7 +2998,7 @@ smp_fetch_conn_rate(struct stktable *table, struct sample *smp, struct stksess * */ static int smp_fetch_sc0_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3011,7 +3011,7 @@ smp_fetch_sc0_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc1_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3024,7 +3024,7 @@ smp_fetch_sc1_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc2_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3038,7 +3038,7 @@ smp_fetch_sc2_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3056,7 +3056,7 @@ smp_fetch_src_conn_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_updt_conn_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stksess *ts; struct stktable_key *key; @@ -3102,7 +3102,7 @@ smp_fetch_conn_cur(struct stktable *table, struct sample *smp, struct stksess *t /* set temp integer to the number of concurrent connections from the session's tracked FE counters */ static int smp_fetch_sc0_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3113,7 +3113,7 @@ smp_fetch_sc0_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned /* set temp integer to the number of concurrent connections from the session's tracked BE counters */ static int smp_fetch_sc1_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3124,7 +3124,7 @@ smp_fetch_sc1_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned /* set temp integer to the number of concurrent connections from the session's tracked BE counters */ static int smp_fetch_sc2_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3138,7 +3138,7 @@ smp_fetch_sc2_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_conn_cur(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3169,7 +3169,7 @@ smp_fetch_sess_cnt(struct stktable *table, struct sample *smp, struct stksess *t /* set temp integer to the cumulated number of sessions from the session's tracked FE counters */ static int smp_fetch_sc0_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3180,7 +3180,7 @@ smp_fetch_sc0_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */ static int smp_fetch_sc1_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3191,7 +3191,7 @@ smp_fetch_sc1_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */ static int smp_fetch_sc2_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3205,7 +3205,7 @@ smp_fetch_sc2_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_sess_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3239,7 +3239,7 @@ smp_fetch_sess_rate(struct stktable *table, struct sample *smp, struct stksess * */ static int smp_fetch_sc0_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3252,7 +3252,7 @@ smp_fetch_sc0_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc1_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3265,7 +3265,7 @@ smp_fetch_sc1_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc2_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3279,7 +3279,7 @@ smp_fetch_sc2_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_sess_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3310,7 +3310,7 @@ smp_fetch_http_req_cnt(struct stktable *table, struct sample *smp, struct stkses /* set temp integer to the cumulated number of sessions from the session's tracked FE counters */ static int smp_fetch_sc0_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3321,7 +3321,7 @@ smp_fetch_sc0_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsig /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */ static int smp_fetch_sc1_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3332,7 +3332,7 @@ smp_fetch_sc1_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsig /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */ static int smp_fetch_sc2_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3346,7 +3346,7 @@ smp_fetch_sc2_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsig */ static int smp_fetch_src_http_req_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3380,7 +3380,7 @@ smp_fetch_http_req_rate(struct stktable *table, struct sample *smp, struct stkse */ static int smp_fetch_sc0_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3393,7 +3393,7 @@ smp_fetch_sc0_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_sc1_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3406,7 +3406,7 @@ smp_fetch_sc1_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_sc2_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3420,7 +3420,7 @@ smp_fetch_sc2_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_src_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3451,7 +3451,7 @@ smp_fetch_http_err_cnt(struct stktable *table, struct sample *smp, struct stkses /* set temp integer to the cumulated number of sessions from the session's tracked FE counters */ static int smp_fetch_sc0_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3462,7 +3462,7 @@ smp_fetch_sc0_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsig /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */ static int smp_fetch_sc1_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3473,7 +3473,7 @@ smp_fetch_sc1_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsig /* set temp integer to the cumulated number of sessions from the session's tracked BE counters */ static int smp_fetch_sc2_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3487,7 +3487,7 @@ smp_fetch_sc2_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsig */ static int smp_fetch_src_http_err_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3521,7 +3521,7 @@ smp_fetch_http_err_rate(struct stktable *table, struct sample *smp, struct stkse */ static int smp_fetch_sc0_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3534,7 +3534,7 @@ smp_fetch_sc0_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_sc1_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3547,7 +3547,7 @@ smp_fetch_sc1_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_sc2_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3561,7 +3561,7 @@ smp_fetch_sc2_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_src_http_err_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3595,7 +3595,7 @@ smp_fetch_kbytes_in(struct stktable *table, struct sample *smp, struct stksess * */ static int smp_fetch_sc0_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3608,7 +3608,7 @@ smp_fetch_sc0_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc1_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3621,7 +3621,7 @@ smp_fetch_sc1_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_sc2_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3635,7 +3635,7 @@ smp_fetch_sc2_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_src_kbytes_in(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3671,7 +3671,7 @@ smp_fetch_bytes_in_rate(struct stktable *table, struct sample *smp, struct stkse */ static int smp_fetch_sc0_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3684,7 +3684,7 @@ smp_fetch_sc0_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_sc1_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3697,7 +3697,7 @@ smp_fetch_sc1_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_sc2_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3711,7 +3711,7 @@ smp_fetch_sc2_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsi */ static int smp_fetch_src_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3745,7 +3745,7 @@ smp_fetch_kbytes_out(struct stktable *table, struct sample *smp, struct stksess */ static int smp_fetch_sc0_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3758,7 +3758,7 @@ smp_fetch_sc0_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigne */ static int smp_fetch_sc1_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3771,7 +3771,7 @@ smp_fetch_sc1_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigne */ static int smp_fetch_sc2_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3785,7 +3785,7 @@ smp_fetch_sc2_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigne */ static int smp_fetch_src_kbytes_out(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3821,7 +3821,7 @@ smp_fetch_bytes_out_rate(struct stktable *table, struct sample *smp, struct stks */ static int smp_fetch_sc0_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3834,7 +3834,7 @@ smp_fetch_sc0_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, uns */ static int smp_fetch_sc1_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3847,7 +3847,7 @@ smp_fetch_sc1_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, uns */ static int smp_fetch_sc2_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3861,7 +3861,7 @@ smp_fetch_sc2_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, uns */ static int smp_fetch_src_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { struct stktable_key *key; @@ -3876,7 +3876,7 @@ smp_fetch_src_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, uns /* set temp integer to the number of active trackers on the SC0 entry */ static int smp_fetch_sc0_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[0].entry) return 0; @@ -3887,7 +3887,7 @@ smp_fetch_sc0_trackers(struct proxy *px, struct session *l4, void *l7, unsigned /* set temp integer to the number of active trackers on the SC0 entry */ static int smp_fetch_sc1_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[1].entry) return 0; @@ -3898,7 +3898,7 @@ smp_fetch_sc1_trackers(struct proxy *px, struct session *l4, void *l7, unsigned /* set temp integer to the number of active trackers on the SC0 entry */ static int smp_fetch_sc2_trackers(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4->stkctr[2].entry) return 0; @@ -3911,7 +3911,7 @@ smp_fetch_sc2_trackers(struct proxy *px, struct session *l4, void *l7, unsigned */ static int smp_fetch_table_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = SMP_F_VOL_TEST; smp->type = SMP_T_UINT; @@ -3924,7 +3924,7 @@ smp_fetch_table_cnt(struct proxy *px, struct session *l4, void *l7, unsigned int */ static int smp_fetch_table_avl(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { px = args->data.prx; smp->flags = SMP_F_VOL_TEST; diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 5d245cf99..ce1712d4f 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -1573,7 +1573,7 @@ ssl_sock_get_dn_oneline(X509_NAME *a, struct chunk *out) /* boolean, returns true if client cert was present */ static int smp_fetch_ssl_fc_has_crt(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4 || l4->si[0].conn->xprt != &ssl_sock) return 0; @@ -1593,7 +1593,7 @@ smp_fetch_ssl_fc_has_crt(struct proxy *px, struct session *l4, void *l7, unsigne /* bin, returns serial in a binary chunk */ static int smp_fetch_ssl_c_serial(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; int ret = 0; @@ -1628,7 +1628,7 @@ out: /* bin, returns the client certificate's SHA-1 fingerprint (SHA-1 hash of DER-encoded certificate) in a binary chunk */ static int smp_fetch_ssl_c_sha1(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; const EVP_MD *digest; @@ -1664,7 +1664,7 @@ out: /*str, returns notafter date in ASN1_UTCTIME format */ static int smp_fetch_ssl_c_notafter(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; int ret = 0; @@ -1699,7 +1699,7 @@ out: /* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */ static int smp_fetch_ssl_c_i_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; X509_NAME *name; @@ -1750,7 +1750,7 @@ out: /*str, returns notbefore date in ASN1_UTCTIME format */ static int smp_fetch_ssl_c_notbefore(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; int ret = 0; @@ -1785,7 +1785,7 @@ out: /* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */ static int smp_fetch_ssl_c_s_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; X509_NAME *name; @@ -1836,7 +1836,7 @@ out: /* integer, returns true if current session use a client certificate */ static int smp_fetch_ssl_c_used(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt; @@ -1862,7 +1862,7 @@ smp_fetch_ssl_c_used(struct proxy *px, struct session *l4, void *l7, unsigned in /* integer, returns the client certificate version */ static int smp_fetch_ssl_c_version(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt; @@ -1889,7 +1889,7 @@ smp_fetch_ssl_c_version(struct proxy *px, struct session *l4, void *l7, unsigned /* str, returns the client certificate sig alg */ static int smp_fetch_ssl_c_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt; int nid; @@ -1923,7 +1923,7 @@ smp_fetch_ssl_c_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned /* str, returns the client certificate key alg */ static int smp_fetch_ssl_c_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt; int nid; @@ -1957,7 +1957,7 @@ smp_fetch_ssl_c_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned /* boolean, returns true if front conn. transport layer is SSL */ static int smp_fetch_ssl_fc(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->type = SMP_T_BOOL; smp->data.uint = (l4->si[0].conn->xprt == &ssl_sock); @@ -1967,7 +1967,7 @@ smp_fetch_ssl_fc(struct proxy *px, struct session *l4, void *l7, unsigned int op /* boolean, returns true if client present a SNI */ static int smp_fetch_ssl_fc_has_sni(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME smp->type = SMP_T_BOOL; @@ -1983,7 +1983,7 @@ smp_fetch_ssl_fc_has_sni(struct proxy *px, struct session *l4, void *l7, unsigne /* bin, returns serial in a binary chunk */ static int smp_fetch_ssl_f_serial(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; int ret = 0; @@ -2014,7 +2014,7 @@ out: /*str, returns notafter date in ASN1_UTCTIME format */ static int smp_fetch_ssl_f_notafter(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; int ret = 0; @@ -2046,7 +2046,7 @@ out: /*str, returns notbefore date in ASN1_UTCTIME format */ static int smp_fetch_ssl_f_notbefore(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; int ret = 0; @@ -2078,7 +2078,7 @@ out: /* integer, returns the frontend certificate version */ static int smp_fetch_ssl_f_version(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt; @@ -2104,7 +2104,7 @@ smp_fetch_ssl_f_version(struct proxy *px, struct session *l4, void *l7, unsigned /* str, returns the client certificate sig alg */ static int smp_fetch_ssl_f_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt; int nid; @@ -2136,7 +2136,7 @@ smp_fetch_ssl_f_sig_alg(struct proxy *px, struct session *l4, void *l7, unsigned /* str, returns the client certificate key alg */ static int smp_fetch_ssl_f_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt; int nid; @@ -2168,7 +2168,7 @@ smp_fetch_ssl_f_key_alg(struct proxy *px, struct session *l4, void *l7, unsigned /* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */ static int smp_fetch_ssl_f_i_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; X509_NAME *name; @@ -2216,7 +2216,7 @@ out: /* str, returns a string of a formatted full dn \C=..\O=..\OU=.. \CN=.. */ static int smp_fetch_ssl_f_s_dn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { X509 *crt = NULL; X509_NAME *name; @@ -2263,7 +2263,7 @@ out: static int smp_fetch_ssl_fc_cipher(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = 0; @@ -2282,7 +2282,7 @@ smp_fetch_ssl_fc_cipher(struct proxy *px, struct session *l4, void *l7, unsigned static int smp_fetch_ssl_fc_alg_keysize(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = 0; @@ -2299,7 +2299,7 @@ smp_fetch_ssl_fc_alg_keysize(struct proxy *px, struct session *l4, void *l7, uns static int smp_fetch_ssl_fc_use_keysize(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = 0; @@ -2318,7 +2318,7 @@ smp_fetch_ssl_fc_use_keysize(struct proxy *px, struct session *l4, void *l7, uns #ifdef OPENSSL_NPN_NEGOTIATED static int smp_fetch_ssl_fc_npn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = 0; smp->type = SMP_T_CSTR; @@ -2340,7 +2340,7 @@ smp_fetch_ssl_fc_npn(struct proxy *px, struct session *l4, void *l7, unsigned in #ifdef OPENSSL_ALPN_NEGOTIATED static int smp_fetch_ssl_fc_alpn(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = 0; smp->type = SMP_T_CSTR; @@ -2361,7 +2361,7 @@ smp_fetch_ssl_fc_alpn(struct proxy *px, struct session *l4, void *l7, unsigned i static int smp_fetch_ssl_fc_protocol(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { smp->flags = 0; @@ -2380,7 +2380,7 @@ smp_fetch_ssl_fc_protocol(struct proxy *px, struct session *l4, void *l7, unsign static int smp_fetch_ssl_fc_session_id(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { #if OPENSSL_VERSION_NUMBER > 0x0090800fL SSL_SESSION *sess; @@ -2407,7 +2407,7 @@ smp_fetch_ssl_fc_session_id(struct proxy *px, struct session *l4, void *l7, unsi static int smp_fetch_ssl_fc_sni(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME smp->flags = 0; @@ -2430,7 +2430,7 @@ smp_fetch_ssl_fc_sni(struct proxy *px, struct session *l4, void *l7, unsigned in /* integer, returns the first verify error in CA chain of client certificate chain. */ static int smp_fetch_ssl_c_ca_err(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4 || l4->si[0].conn->xprt != &ssl_sock) return 0; @@ -2450,7 +2450,7 @@ smp_fetch_ssl_c_ca_err(struct proxy *px, struct session *l4, void *l7, unsigned /* integer, returns the depth of the first verify error in CA chain of client certificate chain. */ static int smp_fetch_ssl_c_ca_err_depth(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4 || l4->si[0].conn->xprt != &ssl_sock) return 0; @@ -2470,7 +2470,7 @@ smp_fetch_ssl_c_ca_err_depth(struct proxy *px, struct session *l4, void *l7, uns /* integer, returns the first verify error on client certificate */ static int smp_fetch_ssl_c_err(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4 || l4->si[0].conn->xprt != &ssl_sock) return 0; @@ -2490,7 +2490,7 @@ smp_fetch_ssl_c_err(struct proxy *px, struct session *l4, void *l7, unsigned int /* integer, returns the verify result on client cert */ static int smp_fetch_ssl_c_verify(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *args, struct sample *smp) + const struct arg *args, struct sample *smp, const char *kw) { if (!l4 || l4->si[0].conn->xprt != &ssl_sock) return 0;