]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: dns: fix DNS header definition
authorVincent Bernat <vincent@bernat.im>
Fri, 8 Apr 2016 20:17:44 +0000 (22:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 May 2016 09:01:08 +0000 (11:01 +0200)
Conforming to RFC 2535, section 6.1. This is not an important bug as
those fields don't seem to be set to something else than 0 and to be
checked on answers.

include/types/dns.h

index 757eaaf28d9a90b0d8cd9a3fb7bcc1d3bf87ed06..98adc983bf44d9e284591f422f348bb014fca7ab 100644 (file)
 /* DNS request or response header structure */
 struct dns_header {
        unsigned short  id:16;          /* identifier */
-       unsigned char   rd :1;          /* recursion desired 0: no, 1: yes */
-       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   z :1;           /* no used */
+       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   ra :1;          /* recursion available 0: no, 1: yes */
+       unsigned char   rcode :4;       /* response code */
        unsigned short  qdcount :16;    /* question count */
        unsigned short  ancount :16;    /* answer count */
        unsigned short  nscount :16;    /* authority count */