From: Thierry FOURNIER Date: Fri, 24 Jul 2015 07:12:15 +0000 (+0200) Subject: MINOR: sample/proto_tcp: export "smp_fetch_src" X-Git-Tag: v1.6-dev4~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a123ad886a69266679f57390956ba3fd819bfb41;p=thirdparty%2Fhaproxy.git MINOR: sample/proto_tcp: export "smp_fetch_src" This patch exports the sample fetch "smp_fetch_src()". --- diff --git a/include/proto/proto_tcp.h b/include/proto/proto_tcp.h index 056129c147..d38a81582e 100644 --- a/include/proto/proto_tcp.h +++ b/include/proto/proto_tcp.h @@ -45,6 +45,9 @@ void tcp_req_conn_keywords_register(struct tcp_action_kw_list *kw_list); void tcp_req_cont_keywords_register(struct tcp_action_kw_list *kw_list); void tcp_res_cont_keywords_register(struct tcp_action_kw_list *kw_list); +/* Export some samples. */ +int smp_fetch_src(const struct arg *args, struct sample *smp, const char *kw, void *private); + /* Converts the INET/INET6 source address to a stick_table key usable for table * lookups. can be STKTABLE_TYPE_IP or STKTABLE_TYPE_IPV6. The function * try to convert the incoming IP to the type expected by the sticktable. diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 00c308a8bd..077bc13dff 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -1990,8 +1990,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(const struct arg *args, struct sample *smp, const char *kw, void *private) +int smp_fetch_src(const struct arg *args, struct sample *smp, const char *kw, void *private) { struct connection *cli_conn = objt_conn(smp->sess->origin);