From: Michael Tremer <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. bf71d529c850e4c71f8199f2f3839ded7bbbec79
Date: Fri, 30 Oct 2026 13:57:17 +0000 (UTC) [thread overview]
Message-ID: <4jGN2P4rqlz2y3W@people01.haj.ipfire.org> (raw)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via bf71d529c850e4c71f8199f2f3839ded7bbbec79 (commit)
via 6463138c6369f419608204e290e619e7abb2ee26 (commit)
via f068a2f0ad85a5a3954129bf34b1ca26782c7480 (commit)
via b34710a4e270d5c50114c81a8e4d181d1378a037 (commit)
via 1ae1752ba2f2375768f81be8d9f92b37a1014cef (commit)
via 185c0c13f929bd33d5200d10c857d9438b226558 (commit)
via a579d5e7fd1ef23523259fbcf2560e12846516d4 (commit)
from ea036dc2eaa0173e706cfda78278f5a16ecfcb3c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bf71d529c850e4c71f8199f2f3839ded7bbbec79
Merge: ea036dc2e 6463138c6
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Fri Oct 30 13:57:12 2026 +0000
Merge branch 'master' into next
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/knot-resolver/config.lua | 36 ++++++++++++++++++++++++++++++++++--
config/knot-resolver/leases.lua | 16 ++++++++--------
2 files changed, 42 insertions(+), 10 deletions(-)
Difference in files:
diff --git a/config/knot-resolver/config.lua b/config/knot-resolver/config.lua
index 21ac063c7..9dcc7bd9d 100644
--- a/config/knot-resolver/config.lua
+++ b/config/knot-resolver/config.lua
@@ -29,6 +29,12 @@ local notify = require("cqueues.notify")
-- Get access to the C interface
local C = ffi.C
+-- Declare functions that are not exposed by Knot Resolver
+ffi.cdef[[
+ int kr_rule_local_data_merge(const knot_rrset_t *rrs, kr_rule_tags_t tags,
+ kr_rule_opts_t opts);
+]]
+
-- Helper function to load a key/value configuration file
function config.load_settings(path)
local settings = {}
@@ -238,6 +244,26 @@ function config.load_forwarders(settings)
policy.rule_forward_add(".", { dnssec=true, auth=false, tcp=tcp }, forwarders)
end
+-- Adds a forward record without creating the corresponding PTR record
+-- (hints.set() always creates both)
+local function add_forward_record(name, address)
+ -- Convert the address into wire format
+ local rdata = kres.str2ip(address)
+ if not rdata then
+ return
+ end
+
+ -- Select the record type
+ local rtype = (#rdata == 16) and kres.type.AAAA or kres.type.A
+
+ -- Create the RRset
+ local rr = kres.rrset(todname(name), rtype, kres.class.IN, 60)
+ rr:add_rdata(rdata, #rdata)
+
+ -- Merge the record so that multiple addresses for the same name are kept
+ C.kr_rule_local_data_merge(rr, 0, C.KR_RULE_OPTS_DEFAULT)
+end
+
-- Load any hosts
function config.load_hosts()
local path = "/var/ipfire/main/hosts"
@@ -281,8 +307,14 @@ function config.load_hosts()
hostname, address)
end
- -- Add the hint
- hints.set(hint)
+ -- Add the hint (including the PTR record)
+ if ptr == "on" then
+ hints.set(hint)
+
+ -- Otherwise only add the forward record
+ else
+ add_forward_record(hint:match("^(%S+)"), address)
+ end
end
end
diff --git a/config/knot-resolver/leases.lua b/config/knot-resolver/leases.lua
index d1c174103..6d259ee5c 100644
--- a/config/knot-resolver/leases.lua
+++ b/config/knot-resolver/leases.lua
@@ -156,16 +156,16 @@ function M.answer()
end
end
- -- If the name exists, we send the answer (or NODATA if we have nothing
- -- for this query type)
- if exists then
- answer = policy.ANSWER(answer, true)
-
- -- Otherwise we send NXDOMAIN
- else
- answer = policy.DENY
+ -- If the name is unknown, we do nothing so that the query can be answered
+ -- by another source (e.g. static hosts) or the upstream servers
+ if not exists then
+ return
end
+ -- Otherwise we send the answer (or NODATA if we have nothing for this
+ -- query type)
+ answer = policy.ANSWER(answer, true)
+
-- Pass the state and request
return answer(state, req)
end
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2026-10-30 13:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4jGN2P4rqlz2y3W@people01.haj.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox