1
Some overview of how Deadwood handles glueless NS queries
3
Functions which allocate memory for addr.glueless:
5
dwx_ns_getip_glueless(), which is called by dwx_ns_getip(), which is called
6
by get_upstream_ip(), which is called by make_remote_connection() and
9
It is zapped in dwx_do_ns_glueless(), called from make_remote_connection(),
10
as well as setup_tcp_server().
14
Glueless NS referral procedure:
16
-> Increase the timeout so the query waiting for the glueless is less likely
19
-> Look for already existing query solving this name.
21
--> If there already is query...
23
---> See if its recurse_depth is under 32
25
----> If it is, set recurse_depth for both the parent and child queries to the
26
the highest value in either + 1
30
----> If recurse_depth in the already existing query is too high, give up the
31
resolution of this name.
33
---> Connect to the query in question; add a local_T with glueless_type set to
34
1 and glueless_conn set to the connection number that needs the glueless
37
--> OK, there isn't already a query.
39
---> Create a new query with a recurse_depth which is the parent's
42
find_inflight_query() looks for an already existing query; I need to
43
write a dwx_find_inflight() version of this for when we already have
44
the query as a dw_str object.
46
In addition to adding the query for solving the glueless NS referral,
47
we also have get_remote_udp_packet() call something to let
48
the parent know we now have an answer for their glueless NS referral,
49
as well as having the parent use said answer to connect to the correct NS
52
We may want to have it so server_fail_noreply() does the right thing,
53
such as allowing the parent to try again with another NS record; however,
54
for the time being, I have this critter ignore local connections
55
which are referrals to NS glueless resolution.