From 7da210700fbdd45a273d6735f6a2a55ae3838633 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 15 Nov 1998 19:10:43 +0000 Subject: [PATCH] _Submits_ but does not use the results from internally-generated queries. --- src/internal.h | 7 ++++--- src/reply.c | 1 + src/types.c | 18 ++++++++++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/internal.h b/src/internal.h index 985da50..f1f4d96 100644 --- a/src/internal.h +++ b/src/internal.h @@ -77,7 +77,7 @@ typedef struct { typedef union { void *ext; - int dmaddr_index; + adns_rr_hostaddr *hostaddr; } qcontext; typedef struct { @@ -86,6 +86,7 @@ typedef struct { int serv; const byte *dgram; int dglen, nsstart, nscount, arcount; + struct timeval now; } parseinfo; typedef struct { @@ -337,7 +338,7 @@ int adns__internal_submit(adns_state ads, adns_query *query_r, * If failstat is nonzero then if we are successful in creating the query * it is immediately failed with code failstat (but _submit still succeds). * - * ctx is copied byte-for-byte into the query. + * *ctx is copied byte-for-byte into the query. */ void *adns__alloc_interim(adns_query qu, size_t sz); @@ -547,7 +548,7 @@ static inline int ctype_alpha(int c) { do { \ (node)->part next= 0; \ (node)->part back= (list).tail; \ - if ((list).tail) (list).tail->part next= (node); else (list).part head= (node); \ + if ((list).tail) (list).tail->part next= (node); else (list).head= (node); \ (list).tail= (node); \ } while(0) diff --git a/src/reply.c b/src/reply.c index ceeacee..9d11607 100644 --- a/src/reply.c +++ b/src/reply.c @@ -268,6 +268,7 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen, pai.nsstart= nsstart; pai.nscount= nscount; pai.arcount= arcount; + pai.now= now; for (rri=0, nrrs=0; rrihost, @@ -374,8 +377,19 @@ static adns_status pap_hostaddr(const parseinfo *pai, int *cbyte_io, if (st) return st; if (rrp->naddrs != -1) return adns_s_ok; - rrp->naddrs= 0; /* fixme additional section didn't have required data */ - rrp->astatus= adns_s_notimplemented; + st= adns__mkquery_frdgram(pai->ads, &pai->qu->vb, &id, + pai->dgram, pai->dglen, dmstart, + adns_r_addr, adns_qf_quoteok_query); + if (st) return st; + + ctx.hostaddr= rrp; + st= adns__internal_submit(pai->ads, &nqu, adns__findtype(adns_r_addr), + &pai->qu->vb, id, + adns_qf_quoteok_query, pai->now, 0, &ctx); + if (st) return st; + + nqu->parent= pai->qu; + LIST_LINK_TAIL_PART(pai->qu->children,nqu,siblings.); return adns_s_ok; } -- 2.30.2