Hi Lukas, On Wed, May 25, 2016 at 10:15:11PM +0200, Lukas Tribus wrote: > 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.
So if I apply it and diff with the code prior to the commit above, I get this : diff --git a/include/types/dns.h b/include/types/dns.h index 757eaaf..50636fd 100644 --- a/include/types/dns.h +++ b/include/types/dns.h @@ -69,9 +69,9 @@ struct dns_header { 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 ad :1; /* authentic data */ 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 */ Does everyone agree that it's indeed the expected fix for the original issue ? I prefer to ask since this patch almost undoes Vincent's initial patch, and that both commit messages cite the RFC to justify being right but neither says exactly what field are causing problem. Thanks guys, Willy