BUG/MEDIUM: dns: Properly initialize new DNS session

When a new DNS session is created, all its fields are not properly
initialized. For instance, "tx_msg_offset" can have any value after the
allocation. So, to fix the bug, pool_zalloc() is now used to allocate new
DNS session.

This patch should fix the issue #1781. It must be backported as far as 2.4.

(cherry picked from commit 14a60d420a66368a4262e8ecf259781292509659)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit a8395aabf53a44f0094381d8b4f679424f0ac818)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit d94450c0980934652a2a64e54394cfe233fbaf62)
Signed-off-by: Willy Tarreau <w@1wt.eu>
1 file changed