From 1799ef47cedcfed8c979e145783fff7c9d1944cc Mon Sep 17 00:00:00 2001 From: radhitya Date: Sun, 5 Jul 2026 14:05:24 +0700 Subject: foreward upstream, in memory cache, udp listener, handler, cli flags --- internal/dns/.pack.go.swp | Bin 0 -> 12288 bytes internal/dns/header.go | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 internal/dns/.pack.go.swp (limited to 'internal/dns') diff --git a/internal/dns/.pack.go.swp b/internal/dns/.pack.go.swp new file mode 100644 index 0000000..dd841fb Binary files /dev/null and b/internal/dns/.pack.go.swp differ diff --git a/internal/dns/header.go b/internal/dns/header.go index 3b51f67..0f462a8 100644 --- a/internal/dns/header.go +++ b/internal/dns/header.go @@ -47,7 +47,7 @@ func (h *Header) SetZ(v uint8) { h.Flags = (h.Flags &^ (0x7 << 4)) | ((uint1 func (h *Header) SetAD(v bool) { h.set(0x0020, v) } func (h *Header) SetCD(v bool) { h.set(0x0010, v) } func (h *Header) SetRCode(v uint8) { h.Flags = (h.Flags &^ 0xF) | (uint16(v) & 0xF) } - +func (h *Header) Rcode() uint8 { return uint8(h.Flags & 0xF) } func (h *Header) set(mask uint16, v bool) { if v { h.Flags |= mask -- cgit v1.2.3