diff options
Diffstat (limited to 'support')
-rw-r--r-- | support/resolv_test.c | 2 | ||||
-rw-r--r-- | support/resolv_test.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/support/resolv_test.c b/support/resolv_test.c index aeca519ee3..b1c745dc8c 100644 --- a/support/resolv_test.c +++ b/support/resolv_test.c @@ -182,6 +182,8 @@ resolv_response_init (struct resolv_response_builder *b, if (flags.tc) b->buffer[2] |= 0x02; b->buffer[3] = 0x80 | flags.rcode; /* Always set RA. */ + if (flags.ad) + b->buffer[3] |= 0x20; /* Fill in the initial section count values. */ b->buffer[4] = flags.qdcount >> 8; diff --git a/support/resolv_test.h b/support/resolv_test.h index e36e3e3ae0..02a11bd712 100644 --- a/support/resolv_test.h +++ b/support/resolv_test.h @@ -134,6 +134,9 @@ struct resolv_response_flags /* If true, the TC (truncation) flag will be set. */ bool tc; + /* If true, the AD (authenticated data) flag will be set. */ + bool ad; + /* Initial section count values. Can be used to artificially increase the counts, for malformed packet testing.*/ unsigned short qdcount; |