[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.
This commit is contained in:
parent
1b4b7ce6dd
commit
c9f6011760
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue