]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stick-table: fix IPv4-to-IPv6 conversion in src_* fetches
authorThierry FOURNIER <tfournier@exceliance.fr>
Mon, 14 Apr 2014 12:35:40 +0000 (14:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Apr 2014 16:22:57 +0000 (18:22 +0200)
commit74c219dc0494e127bf73e1fdbfd5dd7c48332c59
tree0b074f652d4cd96108b2d16cab609498e498f456
parentb75d692ca6cc61a99e355203c21eaf2e39b3c3cd
BUG/MEDIUM: stick-table: fix IPv4-to-IPv6 conversion in src_* fetches

The function addr_to_stktable_key doesn't consider the expected
type of key. If the stick table key is based on IPv6 addresses
and the input is IPv4, the returned key is IPv4 adddress and his
length is 4 bytes, while is expected 16 bytes key.

This patch considers the expected key and try to convert IPv4 to
IPv6 and IPv6 to IPv4 according with the expected key.

This fixes the bug reported by Apollon Oikonomopoulos.

This bug was introduced somewhere in the 1.5-dev process.
include/proto/proto_tcp.h
src/session.c