1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

Check correct bit for DNS truncation

* lisp/net/dns.el (dns-read): The TC bit is the second bit, not the
third bit.  (Bug#64678)

Copyright-paperwork-exempt: yes
This commit is contained in:
Marc van der Wal 2023-07-17 10:56:06 +02:00 committed by Robert Pluim
parent 9d332c4993
commit fcf9e91f44

View file

@ -212,7 +212,7 @@ If TCP-P, the first two bytes of the packet will be the length field."
spec))
(push (list 'authoritative-p (if (zerop (logand byte (ash 1 2)))
nil t)) spec)
(push (list 'truncated-p (if (zerop (logand byte (ash 1 2))) nil t))
(push (list 'truncated-p (if (zerop (logand byte (ash 1 1))) nil t))
spec)
(push (list 'recursion-desired-p
(if (zerop (logand byte (ash 1 0))) nil t)) spec))