File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ type Header struct {
318318 RecursionDesired bool
319319 RecursionAvailable bool
320320 AuthenticData bool
321+ CheckingDisabled bool
321322 RCode RCode
322323}
323324
@@ -342,6 +343,9 @@ func (m *Header) pack() (id uint16, bits uint16) {
342343 if m .AuthenticData {
343344 bits |= headerBitAD
344345 }
346+ if m .CheckingDisabled {
347+ bits |= headerBitCD
348+ }
345349 return
346350}
347351
@@ -384,6 +388,7 @@ const (
384388 headerBitRD = 1 << 8 // recursion desired
385389 headerBitRA = 1 << 7 // recursion available
386390 headerBitAD = 1 << 5 // authentic data
391+ headerBitCD = 1 << 4 // checking disabled
387392)
388393
389394var sectionNames = map [section ]string {
@@ -462,6 +467,7 @@ func (h *header) header() Header {
462467 RecursionDesired : (h .bits & headerBitRD ) != 0 ,
463468 RecursionAvailable : (h .bits & headerBitRA ) != 0 ,
464469 AuthenticData : (h .bits & headerBitAD ) != 0 ,
470+ CheckingDisabled : (h .bits & headerBitCD ) != 0 ,
465471 RCode : RCode (h .bits & 0xF ),
466472 }
467473}
You can’t perform that action at this time.
0 commit comments