From 5b155e76d9073b5d0163a3c91c5925067d0684fe Mon Sep 17 00:00:00 2001 From: Nihanth Subramanya Date: Fri, 22 Jan 2021 17:47:36 +0100 Subject: [PATCH] Add constant for NXDOMAIN Trivially OR'ing 0x03 to the flags works to set NXDOMAIN in the response header. Exposing a constant for this makes it accessible and obvious. --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 0c14525..720ffb0 100644 --- a/index.js +++ b/index.js @@ -1644,6 +1644,7 @@ exports.RECURSION_AVAILABLE = 1 << 7 exports.AUTHENTIC_DATA = 1 << 5 exports.CHECKING_DISABLED = 1 << 4 exports.DNSSEC_OK = 1 << 15 +exports.NXDOMAIN = 0x03 exports.encode = function (result, buf, offset) { const allocing = !buf