From c9f6011760b2e829421c4b57f9b04169734a2cb4 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 7 Apr 2011 10:44:39 +0200 Subject: [PATCH] [BUG] TCP source tracking was broken with IPv6 changes John Helliwell reported a bug when using TCP source address tracking on Solaris. The bug was introduced in haproxy 1.5-dev5. --- include/proto/proto_tcp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/proto/proto_tcp.h b/include/proto/proto_tcp.h index c7aef6a89..ae23c726a 100644 --- a/include/proto/proto_tcp.h +++ b/include/proto/proto_tcp.h @@ -46,8 +46,10 @@ static inline struct stktable_key *tcp_src_to_stktable_key(struct session *s) switch (s->si[0].addr.c.from.ss_family) { case AF_INET: static_table_key.key = (void *)&((struct sockaddr_in *)&s->si[0].addr.c.from)->sin_addr; + break; case AF_INET6: static_table_key.key = (void *)&((struct sockaddr_in6 *)&s->si[0].addr.c.from)->sin6_addr; + break; } return &static_table_key; }