aboutsummaryrefslogtreecommitdiffstats
path: root/testcode/fake_event.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2020-12-08 21:23:03 +0000
committerCy Schubert <cy@FreeBSD.org>2020-12-08 21:23:03 +0000
commitc1dbcbf2d10cd99864ab0eb44358d9875ba0c0a5 (patch)
tree8cbca8d9dc814933d2bc59b6623b792b549aac6b /testcode/fake_event.c
parent4cb89f2eee3bb358f0491932ab0498b5319f4229 (diff)
downloadsrc-c1dbcbf2d10cd99864ab0eb44358d9875ba0c0a5.tar.gz
src-c1dbcbf2d10cd99864ab0eb44358d9875ba0c0a5.zip
Vendor import of Unbound 1.13.0.vendor/unbound/1.13.0
Security: CVE-2020-28935
Notes
Notes: svn path=/vendor/unbound/dist/; revision=368464 svn path=/vendor/unbound/1.13.0/; revision=368465; tag=vendor/unbound/1.13.0
Diffstat (limited to 'testcode/fake_event.c')
-rw-r--r--testcode/fake_event.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/testcode/fake_event.c b/testcode/fake_event.c
index d8df76492540..591557c35f12 100644
--- a/testcode/fake_event.c
+++ b/testcode/fake_event.c
@@ -872,6 +872,7 @@ listen_create(struct comm_base* base, struct listen_port* ATTR_UNUSED(ports),
int ATTR_UNUSED(harden_large_queries),
uint32_t ATTR_UNUSED(http_max_streams),
char* ATTR_UNUSED(http_endpoint),
+ int ATTR_UNUSED(http_notls),
struct tcl_list* ATTR_UNUSED(tcp_conn_limit),
void* ATTR_UNUSED(sslctx), struct dt_env* ATTR_UNUSED(dtenv),
comm_point_callback_type* cb, void *cb_arg)
@@ -1044,7 +1045,7 @@ outside_network_create(struct comm_base* base, size_t bufsize,
void (*unwanted_action)(void*), void* ATTR_UNUSED(unwanted_param),
int ATTR_UNUSED(do_udp), void* ATTR_UNUSED(sslctx),
int ATTR_UNUSED(delayclose), int ATTR_UNUSED(tls_use_sni),
- struct dt_env* ATTR_UNUSED(dtenv))
+ struct dt_env* ATTR_UNUSED(dtenv), int ATTR_UNUSED(udp_connect))
{
struct replay_runtime* runtime = (struct replay_runtime*)base;
struct outside_network* outnet = calloc(1,
@@ -1213,7 +1214,7 @@ struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
sldns_buffer_flip(pend->buffer);
if(1) {
struct edns_data edns;
- struct edns_tag_addr* client_tag_addr;
+ struct edns_string_addr* client_string_addr;
if(!inplace_cb_query_call(env, qinfo, flags, addr, addrlen,
zone, zonelen, qstate, qstate->region)) {
free(pend);
@@ -1227,13 +1228,13 @@ struct serviced_query* outnet_serviced_query(struct outside_network* outnet,
edns.bits = 0;
if(dnssec)
edns.bits = EDNS_DO;
- if((client_tag_addr = edns_tag_addr_lookup(
- &env->edns_tags->client_tags,
+ if((client_string_addr = edns_string_addr_lookup(
+ &env->edns_strings->client_strings,
addr, addrlen))) {
- uint16_t client_tag = htons(client_tag_addr->tag_data);
edns_opt_list_append(&qstate->edns_opts_back_out,
- env->edns_tags->client_tag_opcode, 2,
- (uint8_t*)&client_tag, qstate->region);
+ env->edns_strings->client_string_opcode,
+ client_string_addr->string_len,
+ client_string_addr->string, qstate->region);
}
edns.opt_list = qstate->edns_opts_back_out;
attach_edns_record(pend->buffer, &edns);
@@ -1510,6 +1511,18 @@ int serviced_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
return 0;
}
+int reuse_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
+{
+ log_assert(0);
+ return 0;
+}
+
+int reuse_id_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
+{
+ log_assert(0);
+ return 0;
+}
+
/* timers in testbound for autotrust. statistics tested in tdir. */
struct comm_timer* comm_timer_create(struct comm_base* base,
void (*cb)(void*), void* cb_arg)