+7 September 2011: Wouter
+ - Fix operation in ipv6 only (do-ip4: no) mode.
+
6 September 2011: Wouter
- fedora specfile updated.
ns->resolved = 1;
}
}
+
+void delegpt_no_ipv4(struct delegpt* dp)
+{
+ struct delegpt_ns* ns;
+ for(ns = dp->nslist; ns; ns = ns->next) {
+ /* no ipv4, so only ipv6 is enough to resolve a nameserver */
+ if(ns->got6)
+ ns->resolved = 1;
+ }
+}
*/
void delegpt_no_ipv6(struct delegpt* dp);
+/**
+ * Register the fact that there is no ipv4 and thus As are not going
+ * to be queried for or be useful.
+ * @param dp: the delegation point. Updated to reflect no ipv4.
+ */
+void delegpt_no_ipv4(struct delegpt* dp);
+
#endif /* ITERATOR_ITER_DELEGPT_H */
return 0;
}
iter_env->supports_ipv6 = cfg->do_ip6;
+ iter_env->supports_ipv4 = cfg->do_ip4;
return 1;
}
* o The address is bogus (DNSSEC validation failure).
* o Listed as donotquery
* o is ipv6 but no ipv6 support (in operating system).
+ * o is ipv4 but no ipv4 support (in operating system).
* o is lame
* Otherwise, an rtt in milliseconds.
* 0 .. USEFUL_SERVER_TOP_TIMEOUT-1
if(!iter_env->supports_ipv6 && addr_is_ip6(&a->addr, a->addrlen)) {
return -1; /* there is no ip6 available */
}
+ if(!iter_env->supports_ipv4 && !addr_is_ip6(&a->addr, a->addrlen)) {
+ return -1; /* there is no ip4 available */
+ }
/* check lameness - need zone , class info */
if(infra_get_lame_rtt(env->infra_cache, &a->addr, a->addrlen,
name, namelen, qtype, &lame, &dnsseclame, &reclame,
query_count++;
}
/* Send the A request. */
- if(!ns->got4) {
+ if(ie->supports_ipv4 && !ns->got4) {
if(!generate_target_query(qstate, iq, id,
ns->name, ns->namelen,
LDNS_RR_TYPE_A, iq->qchase.qclass)) {
ns->done_pside6 = 1;
query_count++;
}
- if(!ns->done_pside4) {
+ if(ie->supports_ipv4 && !ns->done_pside4) {
/* Send the A request. */
if(!generate_parentside_target_query(qstate, iq, id,
ns->name, ns->namelen,
}
if(!ie->supports_ipv6)
delegpt_no_ipv6(iq->dp);
+ if(!ie->supports_ipv4)
+ delegpt_no_ipv4(iq->dp);
delegpt_log(VERB_ALGO, iq->dp);
if(iq->num_current_queries>0) {
/** A flag to indicate whether or not we have an IPv6 route */
int supports_ipv6;
+ /** A flag to indicate whether or not we have an IPv4 route */
+ int supports_ipv4;
+
/** A set of inetaddrs that should never be queried. */
struct iter_donotq* donotq;