miekg/dns — pull request #69 by millerkil (2014-01-05 20:34:52+00:00)
Title: Refactor SetRcode, rd bit is now set properly for error packets

I noticed the rd bit was not being set for error packets. Some clients use this to determine if the server accepts recursive requests (at least `dig` does). Regardless, the response rd bit should always be the same as the request rd bit. While fixing this I noticed that `SetReply` has the proper functionality, and is almost equivalent to `SetRcode`. So I refactored the code.