From e1b6145e5cc0d222750c6b18b64fd8d60b44ecc6 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Wed, 17 May 2017 12:39:43 +0000 Subject: [PATCH] descript can have NULL _name for unknown types (even though only A, AAAA at this point), but the type_buf() routine works all the time. git-svn-id: file:///svn/unbound/trunk@4166 be551aaa-1e26-0410-a405-d3ace91eadb9 --- ipsecmod/ipsecmod.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ipsecmod/ipsecmod.c b/ipsecmod/ipsecmod.c index 6f61f13d3..132078a80 100644 --- a/ipsecmod/ipsecmod.c +++ b/ipsecmod/ipsecmod.c @@ -296,8 +296,11 @@ ipsecmod_handle_query(struct module_qstate* qstate, if(!iq->ipseckey_done) { if(qstate->qinfo.qtype == LDNS_RR_TYPE_A || qstate->qinfo.qtype == LDNS_RR_TYPE_AAAA) { + char type[16]; + sldns_wire2str_type_buf(qstate->qinfo.qtype, type, + sizeof(type)); verbose(VERB_ALGO, "ipsecmod: query for %s; engaging", - sldns_rr_descript(qstate->qinfo.qtype)->_name); + type); qstate->no_cache_store = 1; } /* Pass request to next module. */ @@ -377,8 +380,11 @@ ipsecmod_handle_response(struct module_qstate* qstate, qstate->return_msg->rep) && /* check that another module didn't SERVFAIL. */ qstate->return_rcode != LDNS_RCODE_SERVFAIL) { + char type[16]; + sldns_wire2str_type_buf(qstate->qinfo.qtype, type, + sizeof(type)); verbose(VERB_ALGO, "ipsecmod: response for %s; generating IPSECKEY " - "subquery", sldns_rr_descript(qstate->qinfo.qtype)->_name); + "subquery", type); /* generate an IPSECKEY query. */ if(!generate_request(qstate, id, qstate->qinfo.qname, qstate->qinfo.qname_len, LDNS_RR_TYPE_IPSECKEY,