]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: sample/proto_tcp: export "smp_fetch_src"
authorThierry FOURNIER <tfournier@arpalert.org>
Fri, 24 Jul 2015 07:12:15 +0000 (09:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Aug 2015 12:14:11 +0000 (14:14 +0200)
This patch exports the sample fetch "smp_fetch_src()".

include/proto/proto_tcp.h
src/proto_tcp.c

index 056129c14728f109b27c7387e8b54a21b4c30ad8..d38a81582eeedfc11d6e589dcce8f656d85b0b5f 100644 (file)
@@ -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. <type> can be STKTABLE_TYPE_IP or STKTABLE_TYPE_IPV6. The function
  * try to convert the incoming IP to the type expected by the sticktable.
index 00c308a8bd1a031c073e5b9b2a995c37a4dde30e..077bc13dff4a6601081af38c123864720bc9233b 100644 (file)
@@ -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);