Use NOTIMP rcode in addition to NOERROR as a valid rcode response so we forward it back to the client.

This commit is contained in:
Russell McConnachie 2020-12-14 15:50:33 -08:00
parent 811cf6db0c
commit 9ebc600e63

View file

@ -134,7 +134,7 @@ response_type_from_server(int rdset,
/* Other response codes mean (so far) to throw the response away as
* meaningless and move on to the next nameserver. */
if(FLAGS_GET_RCODE(msg->rep->flags) != LDNS_RCODE_NOERROR)
if(FLAGS_GET_RCODE(msg->rep->flags) != LDNS_RCODE_NOERROR && FLAGS_GET_RCODE(msg->rep->flags) != LDNS_RCODE_NOTIMP)
return RESPONSE_TYPE_THROWAWAY;
/* Note: TC bit has already been handled */