trevoro / node-named

DNS Server in node.js
MIT License
356 stars 100 forks source link

Fixed malformed response from bad ARCOUNT #43

Open artur99 opened 4 years ago

artur99 commented 4 years ago

_authority and _additional are never filled with data but at response, the corresponding counters are not 0 but contain the counters from the request which will produce a malformed response.

For example, running dig @127.0.0.1 facebook.com A would show a warning like this: ;; Warning: Message parser reports malformed message packet. Caused by the fact that at request the ARCOUNT is 1, but at response, there's no Additional Response entries, but the counter is set to 1.