diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-12-01 17:00:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-12-01 17:00:37 +0000 |
commit | 78ac4a61f7385eb05bafdbd465918be0b8c727d0 (patch) | |
tree | 92132781150f85561d30d49b24c4dae8fbb9d0a3 /contrib/librdns/resolver.c | |
parent | b805127041e641e3c5e4f8cd2eecc50f0df1f1ad (diff) | |
download | rspamd-78ac4a61f7385eb05bafdbd465918be0b8c727d0.tar.gz rspamd-78ac4a61f7385eb05bafdbd465918be0b8c727d0.zip |
[Minor] Process DNS reply flags
Diffstat (limited to 'contrib/librdns/resolver.c')
-rw-r--r-- | contrib/librdns/resolver.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/librdns/resolver.c b/contrib/librdns/resolver.c index 2c402077c..a0f09a294 100644 --- a/contrib/librdns/resolver.c +++ b/contrib/librdns/resolver.c @@ -149,7 +149,7 @@ rdns_make_reply (struct rdns_request *req, enum dns_rcode rcode) rep->entries = NULL; rep->code = rcode; req->reply = rep; - rep->authenticated = false; + rep->flags = 0; rep->requested_name = req->requested_names[0].name; } @@ -223,7 +223,11 @@ rdns_parse_reply (uint8_t *in, int r, struct rdns_request *req, rep = rdns_make_reply (req, header->rcode); if (header->ad) { - rep->authenticated = true; + rep->flags |= RDNS_AUTH; + } + + if (header->tc) { + rep->flags |= RDNS_TRUNCATED; } if (rep == NULL) { |