From a4a9fbdb8fe5b7803b5e70845fc1cf78ed3ec016 Mon Sep 17 00:00:00 2001 From: Ralph Dolmans Date: Mon, 3 Feb 2020 14:19:44 +0100 Subject: [PATCH 1/4] - remove unused code block in respip --- respip/respip.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/respip/respip.c b/respip/respip.c index 7147a051c..3dce5fa7b 100644 --- a/respip/respip.c +++ b/respip/respip.c @@ -950,8 +950,6 @@ respip_rewrite_reply(const struct query_info* qinfo, r->taglistlen, ctaglist, ctaglen)) { if((raddr = respip_addr_lookup(rep, r->respip_set, &rrset_id))) { - } - if(raddr) { if(!respip_use_rpz(raddr, r, &action, &data, &rpz_log, &log_name, &rpz_cname_override, region, &rpz_used)) { From 8c88ab474758ab24e82cb4dc960e847f3d945923 Mon Sep 17 00:00:00 2001 From: Ralph Dolmans Date: Mon, 3 Feb 2020 16:44:21 +0100 Subject: [PATCH 2/4] - Add assertion to please static analyzer --- doc/Changelog | 3 +++ respip/respip.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index 5640c44f7..99ebfcb04 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +-3 February 2020: Ralph + - Add assertion to please static analyzer + 31 January 2020: Wouter - Fix fclose on error in TLS session ticket code. diff --git a/respip/respip.c b/respip/respip.c index 3dce5fa7b..ec7026add 100644 --- a/respip/respip.c +++ b/respip/respip.c @@ -913,6 +913,8 @@ respip_rewrite_reply(const struct query_info* qinfo, view = cinfo->view; ipset = cinfo->respip_set; + log_assert(ipset); + /** Try to use response-ip config from the view first; use * global response-ip config if we don't have the view or we don't * have the matching per-view config (and the view allows the use @@ -936,7 +938,7 @@ respip_rewrite_reply(const struct query_info* qinfo, if(!raddr && !view->isfirst) goto done; } - if(!raddr && ipset && (raddr = respip_addr_lookup(rep, ipset, + if(!raddr && (raddr = respip_addr_lookup(rep, ipset, &rrset_id))) { action = (enum respip_action)local_data_find_tag_action( raddr->taglist, raddr->taglen, ctaglist, ctaglen, From dde863160072b8d8791841c027f9550cf8f23ebd Mon Sep 17 00:00:00 2001 From: Alex Band Date: Mon, 3 Feb 2020 16:51:03 +0100 Subject: [PATCH 3/4] Link to NLnet Labs funding page --- .github/FUNDING.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..ecee84aa4 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ['https://nlnetlabs.nl/funding/'] From 4fc622031d2a2c9195815da3a38495633c383b7c Mon Sep 17 00:00:00 2001 From: Ralph Dolmans Date: Mon, 3 Feb 2020 16:52:25 +0100 Subject: [PATCH 4/4] - Reformat rpz disabled stats counter --- daemon/worker.c | 3 +-- services/mesh.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/daemon/worker.c b/daemon/worker.c index d41453f7c..c41cc5f85 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -603,8 +603,7 @@ apply_respip_action(struct worker* worker, const struct query_info* qinfo, if(worker->stats.extended && actinfo.rpz_used) { if(actinfo.rpz_disabled) - worker->stats.rpz_action[RPZ_DISABLED_ACTION] += - actinfo.rpz_disabled; + worker->stats.rpz_action[RPZ_DISABLED_ACTION]++; if(actinfo.rpz_cname_override) worker->stats.rpz_action[RPZ_CNAME_OVERRIDE_ACTION]++; else diff --git a/services/mesh.c b/services/mesh.c index 039eab53a..61127c845 100644 --- a/services/mesh.c +++ b/services/mesh.c @@ -1191,8 +1191,7 @@ void mesh_query_done(struct mesh_state* mstate) if(mstate->s.env->cfg->stat_extended && mstate->s.respip_action_info->rpz_used) { if(mstate->s.respip_action_info->rpz_disabled) - mstate->s.env->mesh->rpz_action[RPZ_DISABLED_ACTION] += - mstate->s.respip_action_info->rpz_disabled; + mstate->s.env->mesh->rpz_action[RPZ_DISABLED_ACTION]++; if(mstate->s.respip_action_info->rpz_cname_override) mstate->s.env->mesh->rpz_action[RPZ_CNAME_OVERRIDE_ACTION]++; else