unsigned int rd:1;
unsigned int ra:1;
- unsigned int unused:3;
+ unsigned int cd : 1;
+ unsigned int ad : 1;
+ unsigned int z : 1;
unsigned int rcode:4;
#else
unsigned int rd :1;
unsigned int qr :1;
unsigned int rcode :4;
- unsigned int unused :3;
+ unsigned int z : 1;
+ unsigned int ad : 1;
+ unsigned int cd : 1;
unsigned int ra :1;
#endif
*p16++ = htons (UDP_PACKET_SIZE);
/* Extended rcode 00 00 */
*p16++ = 0;
- /* Z 10000000 00000000 to allow dnssec, disabled currently */
- *p16++ = 0;
+ /* Z 10000000 00000000 to allow dnssec */
+ p8 = (uint8_t *)p16;
+ *p8++ = 0x80;
+ *p8++ = 0;
+ p16 = (uint16_t *)p8;
/* Length */
*p16 = 0;
req->pos += sizeof (uint8_t) + sizeof (uint16_t) * 5;
struct rdns_reply_entry *entries;
const char *requested_name;
enum dns_rcode code;
+ bool authenticated;
};
typedef void (*rdns_periodic_callback)(void *user_data);
rep->entries = NULL;
rep->code = rcode;
req->reply = rep;
+ rep->authenticated = false;
}
return rep;
*/
rep = rdns_make_reply (req, header->rcode);
+ if (header->ad) {
+ rep->authenticated = true;
+ }
+
if (rep == NULL) {
rdns_warn ("Cannot allocate memory for reply");
return false;