tungd / elixir-dns

DNS library for Elixir
BSD 3-Clause "New" or "Revised" License
114 stars 37 forks source link

Warning when using with dig #27

Closed jveiga closed 5 years ago

jveiga commented 5 years ago

Hi, I was trying out this library and querying with dig, for example:

$ dig @localhost -p 8000 facebook.com
;; Warning: query response not set
....

from reading online, it means I'm missing a field called QR

Where should I set it?

tungd commented 5 years ago

Hi, I've updated the test server example. Particularly:

%{record | anlist: [resource], header: %{record.header | qr: true}}

The DNS spec requires qr bit on DNS.Header set to distinguish between query and response.