aboutsummaryrefslogtreecommitdiff
path: root/iterator/iterator.h
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2026-08-04 10:04:44 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2026-08-04 10:04:44 +0000
commit84ffc29dc8ddb0c946db5cb3b3c1310bec6a9e6c (patch)
tree93f0b0071b6b34da50dd62dae3cee8ed757676e8 /iterator/iterator.h
parentc68e7bcd81d62e9f5364c6da22fd9917976acf85 (diff)
Diffstat (limited to 'iterator/iterator.h')
-rw-r--r--iterator/iterator.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/iterator/iterator.h b/iterator/iterator.h
index ae4b4e45170a..df5449c52533 100644
--- a/iterator/iterator.h
+++ b/iterator/iterator.h
@@ -104,6 +104,11 @@ extern int BLACKLIST_PENALTY;
#define RTT_BAND 400
/** Number of retries for empty nodata packets before it is accepted. */
#define EMPTY_NODATA_RETRY_COUNT 2
+/** max label-strip iterations in DSNS_FIND_STATE (RFC 4035 4.2 parent-NS
+ * search) before giving up; bounds upstream NS sends per client DS.
+ * Means the max number of labels in grandchild to the grandparent zone that
+ * are co-hosted. */
+#define MAX_DSNS_FIND_COUNT 20
/**
* Iterator global state for nat64.
@@ -375,6 +380,10 @@ struct iter_qstate {
/** if true, already tested for ratelimiting and passed the test */
int ratelimit_ok;
+ /** If the last query, that may be a referral, incremented the
+ * ratelimit counter. */
+ int ratelimit_incremented;
+
/**
* The query must store NS records from referrals as parentside RRs
* Enabled once it hits resolution problems, to throttle retries.
@@ -399,6 +408,8 @@ struct iter_qstate {
uint8_t* dsns_point;
/** length of the dname in dsns_point */
size_t dsns_point_len;
+ /** number of label-strip iterations performed in DSNS_FIND_STATE */
+ int dsns_count;
/**
* expected dnssec information for this iteration step.
@@ -434,6 +445,13 @@ struct iter_qstate {
* already so that it is accepted later. */
int empty_nodata_found;
+ /** Store if the answer was empty, but lame, before it became empty.*/
+ int msg_lame_empty;
+
+ /** Store if the answer was a referral, to self, before scrub. So the
+ * it is not some sort of answer. */
+ int msg_lame_referral;
+
/** list of pending queries to authoritative servers. */
struct outbound_list outlist;