Don't ignore packets with bad question/header.
If at least DNS header comes, treat it as a DNS packet; else ignore. If query doesn't carry a question, reply with FORMERR. If query carries more questions, reply with FORMERR. If packet parsing fails, reply with FORMERR. If there is a TC/RA/AA flag in query, accept it as soft error.
Showing with 35 additions and 27 deletions