mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix #422: IPv6 fallback issues when IPv6 is not properly
enabled/configured.
This commit is contained in:
parent
ee0a65250a
commit
74e06cc4b3
4 changed files with 36 additions and 0 deletions
|
|
@ -70,6 +70,7 @@
|
|||
#include "util/edns.h"
|
||||
#include "iterator/iter_fwd.h"
|
||||
#include "iterator/iter_hints.h"
|
||||
#include "iterator/iter_utils.h"
|
||||
#include "validator/autotrust.h"
|
||||
#include "validator/val_anchor.h"
|
||||
#include "respip/respip.h"
|
||||
|
|
@ -1821,6 +1822,8 @@ worker_init(struct worker* worker, struct config_file *cfg,
|
|||
worker_delete(worker);
|
||||
return 0;
|
||||
}
|
||||
iterator_set_ip46_support(&worker->daemon->mods, worker->daemon->env,
|
||||
worker->back);
|
||||
/* start listening to commands */
|
||||
if(!tube_setup_bg_listen(worker->cmd, worker->base,
|
||||
&worker_handle_control_cmd, worker)) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
15 February 2021: Wouter
|
||||
- Fix #422: IPv6 fallback issues when IPv6 is not properly
|
||||
enabled/configured.
|
||||
|
||||
10 February 2021: Wouter
|
||||
- Merge PR #420 from dyunwei: DOH not responsing with
|
||||
"http2_query_read_done failure" logged.
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
#include "services/cache/infra.h"
|
||||
#include "services/cache/dns.h"
|
||||
#include "services/cache/rrset.h"
|
||||
#include "services/outside_network.h"
|
||||
#include "util/net_help.h"
|
||||
#include "util/module.h"
|
||||
#include "util/log.h"
|
||||
|
|
@ -1435,3 +1436,17 @@ iter_stub_fwd_no_cache(struct module_qstate *qstate, struct query_info *qinf)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void iterator_set_ip46_support(struct module_stack* mods,
|
||||
struct module_env* env, struct outside_network* outnet)
|
||||
{
|
||||
int m = modstack_find(mods, "iterator");
|
||||
struct iter_env* ie = NULL;
|
||||
if(m == -1)
|
||||
return;
|
||||
ie = (struct iter_env*)env->modinfo[m];
|
||||
if(outnet->num_ip4 == 0)
|
||||
ie->supports_ipv4 = 0;
|
||||
if(outnet->num_ip6 == 0)
|
||||
ie->supports_ipv6 = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ struct reply_info;
|
|||
struct module_qstate;
|
||||
struct sock_list;
|
||||
struct ub_packed_rrset_key;
|
||||
struct module_stack;
|
||||
struct outside_network;
|
||||
|
||||
/**
|
||||
* Process config options and set iterator module state.
|
||||
|
|
@ -385,4 +387,16 @@ int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp);
|
|||
int iter_stub_fwd_no_cache(struct module_qstate *qstate,
|
||||
struct query_info *qinf);
|
||||
|
||||
/**
|
||||
* Set support for IP4 and IP6 depending on outgoing interfaces
|
||||
* in the outside network. If none, no support, so no use to lookup
|
||||
* the AAAA and then attempt to use it if there is no outgoing-interface
|
||||
* for it.
|
||||
* @param mods: modstack to find iterator module in.
|
||||
* @param env: module env, find iterator module (if one) in there.
|
||||
* @param outnet: outside network structure.
|
||||
*/
|
||||
void iterator_set_ip46_support(struct module_stack* mods,
|
||||
struct module_env* env, struct outside_network* outnet);
|
||||
|
||||
#endif /* ITERATOR_ITER_UTILS_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue