]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: proto_tcp: remove src6 and dst6 pattern fetch methods
authorWilly Tarreau <w@1wt.eu>
Mon, 7 May 2012 19:36:48 +0000 (21:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 May 2012 19:28:15 +0000 (21:28 +0200)
These methods have been superseded by src and dst which support
multiple families. There is no point keeping them since they appeared
in a development version anyway.

For configurations using "src6", please use "src" instead. For "dst6",
use "dst" instead.

doc/configuration.txt
src/proto_tcp.c

index a484a04586a781607c074704f87e4f5f09f6993d..9d4f25845c44cef19d93b58e511e84a9f61ffcde 100644 (file)
@@ -8332,9 +8332,6 @@ The list of currently supported pattern fetch functions is the following :
                On IPv6 tables, IPv4 address is mapped to its IPv6 equivalent,
                according to RFC 4291.
 
-  src6         This is the source IPv6 address of the client of the session.
-               It is of type IPv6 and only works with such tables.
-
   dst          This is the destination IPv4 address of the session on the
                client side, which is the address the client connected to.
                It can be useful when running in transparent mode. It is of
@@ -8342,11 +8339,6 @@ The list of currently supported pattern fetch functions is the following :
                On IPv6 tables, IPv4 address is mapped to its IPv6 equivalent,
                according to RFC 4291.
 
-  dst6         This is the destination IPv6 address of the session on the
-               client side, which is the address the client connected to.
-               It can be useful when running in transparent mode. It is of
-               type IPv6 and only works with such tables.
-
   dst_port     This is the destination TCP port of the session on the client
                side, which is the port the client connected to. This might be
                used when running in transparent mode or when assigning dynamic
index 0c389d87c355205db6b68fbffb645aab389d817a..80a7c66b3fddeee6b33a8232a647680b75de8a00 100644 (file)
@@ -1393,19 +1393,6 @@ smp_fetch_src(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
        return 1;
 }
 
-/* extract the connection's source ipv6 address */
-static int
-smp_fetch_src6(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-               const struct arg *arg_p, struct sample *smp)
-{
-       if (l4->si[0].addr.from.ss_family != AF_INET6)
-               return 0;
-
-       smp->type = SMP_T_IPV6;
-       memcpy(smp->data.ipv6.s6_addr, ((struct sockaddr_in6 *)&l4->si[0].addr.from)->sin6_addr.s6_addr, sizeof(smp->data.ipv6.s6_addr));
-       return 1;
-}
-
 /* 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,
@@ -1443,21 +1430,6 @@ smp_fetch_dst(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
        return 1;
 }
 
-/* extract the connection's destination ipv6 address */
-static int
-smp_fetch_dst6(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-               const struct arg *arg_p, struct sample *smp)
-{
-       stream_sock_get_to_addr(&l4->si[0]);
-
-       if (l4->si[0].addr.to.ss_family != AF_INET6)
-               return 0;
-
-       smp->type = SMP_T_IPV6;
-       memcpy(smp->data.ipv6.s6_addr, ((struct sockaddr_in6 *)&l4->si[0].addr.to)->sin6_addr.s6_addr, sizeof(smp->data.ipv6.s6_addr));
-       return 1;
-}
-
 /* 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,
@@ -1638,9 +1610,7 @@ static struct acl_kw_list acl_kws = {{ },{
  */
 static struct sample_fetch_kw_list sample_fetch_keywords = {{ },{
        { "src",         smp_fetch_src,           0,                      NULL,           SMP_T_IPV4, SMP_CAP_REQ|SMP_CAP_RES },
-       { "src6",        smp_fetch_src6,          0,                      NULL,           SMP_T_IPV6, SMP_CAP_REQ|SMP_CAP_RES },
        { "dst",         smp_fetch_dst,           0,                      NULL,           SMP_T_IPV4, SMP_CAP_REQ|SMP_CAP_RES },
-       { "dst6",        smp_fetch_dst6,          0,                      NULL,           SMP_T_IPV6, SMP_CAP_REQ|SMP_CAP_RES },
        { "dst_port",    smp_fetch_dport,         0,                      NULL,           SMP_T_UINT, SMP_CAP_REQ|SMP_CAP_RES },
        { "payload",     smp_fetch_payload,       ARG2(2,UINT,UINT),      val_payload,    SMP_T_CBIN, SMP_CAP_REQ|SMP_CAP_RES },
        { "payload_lv",  smp_fetch_payload_lv,    ARG3(2,UINT,UINT,SINT), val_payload_lv, SMP_T_CBIN, SMP_CAP_REQ|SMP_CAP_RES },