[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.
diff --git a/include/proto/proto_tcp.h b/include/proto/proto_tcp.h
index c7aef6a..ae23c72 100644
--- a/include/proto/proto_tcp.h
+++ b/include/proto/proto_tcp.h
@@ -46,8 +46,10 @@
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;
}