haproxy/0006-BUG-MEDIUM-dns-unbreak-DNS-resolver-after-header-fix.patch
Marcus Rueckert 55e4255fc5 - pull patches from git to fix some important issues:
0001-BUG-MAJOR-fix-listening-IP-address-storage-for-front.patch
  0002-BUG-MINOR-fix-listening-IP-address-storage-for-front.patch
  0003-DOC-Fix-typo-so-fetch-is-properly-parsed-by-Cyril-s-.patch
  0004-BUG-MAJOR-http-fix-breakage-of-reqdeny-causing-rando.patch
  0005-BUG-MEDIUM-stick-tables-fix-breakage-in-table-conver.patch
  0006-BUG-MEDIUM-dns-unbreak-DNS-resolver-after-header-fix.patch
  0007-BUILD-fix-build-on-Solaris-11.patch
  0008-CLEANUP-connection-fix-double-negation-on-memcmp.patch
  0009-BUG-MEDIUM-stats-show-servers-state-may-show-an-serv.patch
  0010-BUG-MEDIUM-fix-risk-of-segfault-with-show-tls-keys.patch
  0011-BUG-MEDIUM-sticktables-segfault-in-some-configuratio.patch
  0012-BUG-MEDIUM-lua-converters-doesn-t-work.patch
  0013-BUG-MINOR-http-add-header-header-name-copied-twice.patch
  0014-BUG-MEDIUM-http-add-header-buffer-overwritten.patch

OBS-URL: https://build.opensuse.org/package/show/server:http/haproxy?expand=0&rev=129
2016-06-09 12:56:55 +00:00

52 lines
2.1 KiB
Diff

From 5f60de08667c3472d95cc20b87753e9fd8520057 Mon Sep 17 00:00:00 2001
From: Lukas Tribus <luky-37@hotmail.com>
Date: Wed, 25 May 2016 22:15:11 +0200
Subject: [PATCH 06/14] BUG/MEDIUM: dns: unbreak DNS resolver after header fix
DNS requests (using the internal resolver) are corrupted since commit
e2f84977165a ("BUG/MINOR: dns: fix DNS header definition").
Fix it by defining the struct in network byte order, while complying
with RFC 2535, section 6.1.
First reported by Eduard Vopicka on discourse.
This must be backported to 1.6 (1.6.5 is affected).
(cherry picked from commit f2ebcb47cbf2af36236fde807c0c21a22d7c1e79)
---
include/types/dns.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/types/dns.h b/include/types/dns.h
index e3d2f6b..15fc01b 100644
--- a/include/types/dns.h
+++ b/include/types/dns.h
@@ -58,16 +58,16 @@
/* DNS request or response header structure */
struct dns_header {
unsigned short id:16; /* identifier */
- unsigned char qr :1; /* query/response 0: query, 1: response */
- unsigned char opcode :4; /* operation code */
- unsigned char aa :1; /* authoritative answer 0: no, 1: yes */
- unsigned char tc :1; /* truncation 0:no, 1: yes */
unsigned char rd :1; /* recursion desired 0: no, 1: yes */
- unsigned char ra :1; /* recursion available 0: no, 1: yes */
- unsigned char z :1; /* not used */
- unsigned char ad :1; /* authentic data */
- unsigned char cd :1; /* checking disabled */
+ unsigned char tc :1; /* truncation 0:no, 1: yes */
+ unsigned char aa :1; /* authoritative answer 0: no, 1: yes */
+ unsigned char opcode :4; /* operation code */
+ unsigned char qr :1; /* query/response 0: query, 1: response */
unsigned char rcode :4; /* response code */
+ unsigned char cd :1; /* checking disabled */
+ unsigned char ad :1; /* authentic data */
+ unsigned char z :1; /* not used */
+ unsigned char ra :1; /* recursion available 0: no, 1: yes */
unsigned short qdcount :16; /* question count */
unsigned short ancount :16; /* answer count */
unsigned short nscount :16; /* authority count */
--
2.6.6