* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. c791d50b483423e0ef54dc46bec638c34334348a
@ 2026-07-09 10:20 Michael Tremer
0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2026-07-09 10:20 UTC (permalink / raw)
To: ipfire-scm
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 c791d50b483423e0ef54dc46bec638c34334348a (commit)
via 34aba3093a4e82db3a45f7b859fdfd6005f83346 (commit)
via 9a2ebbc30f543403986590086306c5977939ddea (commit)
from d1d684fcd919819cfde07e65b91bee40a6c81d5c (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 c791d50b483423e0ef54dc46bec638c34334348a
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Thu Jul 9 12:09:09 2026 +0200
knot-resolver: Force SafeSearch for mobile version of YouTube
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
commit 34aba3093a4e82db3a45f7b859fdfd6005f83346
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Thu Jul 9 12:07:57 2026 +0200
knot-resolver: Don't overwrite zone apexes
For SafeSearch we want to ensure that there are no leaks, but it is for
obvious reasons nonsensical to overwrite the apex.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
commit 9a2ebbc30f543403986590086306c5977939ddea
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Wed Jul 8 18:24:44 2026 +0200
knot-resolver: Use native logging functions
The dummy functions were only to keep development quick when building
the proof-of-concept.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/knot-resolver/config.lua | 14 ++++++--------
config/knot-resolver/leases.lua | 16 ++++++----------
2 files changed, 12 insertions(+), 18 deletions(-)
Difference in files:
diff --git a/config/knot-resolver/config.lua b/config/knot-resolver/config.lua
index c382434c2..ba93fc311 100644
--- a/config/knot-resolver/config.lua
+++ b/config/knot-resolver/config.lua
@@ -329,24 +329,22 @@ function config.load_safesearch(settings)
-- Enable Googe Safe Search
for i, tld in ipairs(GOOGLE_TLDS) do
- local name = string.format("google.%s", tld)
-
- add({ name, "www." .. name}, "forcesafesearch.google.com")
+ add({ string.format("www.google.%s", tld) }, "forcesafesearch.google.com")
end
-- Enable Bing Strict Search
- add({ "bing.com", "www.bing.com" }, "strict.bing.com")
+ add({ "www.bing.com" }, "strict.bing.com")
-- Enable DuckDuckGo Safe Search
- add({ "duckduckgo.com", "www.duckduckgo.com" }, "safe.duckduckgo.com")
+ add({ "www.duckduckgo.com" }, "safe.duckduckgo.com")
-- Enable Yandex Family Search
- add({ "yandex.com", "www.yandex.com" }, "familysearch.yandex.com")
- add({ "yandex.ru", "www.yandex.ru" }, "familysearch.yandex.ru")
+ add({ "www.yandex.com" }, "familysearch.yandex.com")
+ add({ "www.yandex.ru" }, "familysearch.yandex.ru")
-- Enable YouTube Safe Search
if settings["ENABLE_SAFE_SEARCH_YOUTUBE"] == "on" then
- add({ "youtube.com", "www.youtube.com" }, "restrictmoderate.youtube.com")
+ add({ "m.youtube.com", "www.youtube.com" }, "restrictmoderate.youtube.com")
end
-- Create a new zone
diff --git a/config/knot-resolver/leases.lua b/config/knot-resolver/leases.lua
index e07885e60..186dfe4d6 100644
--- a/config/knot-resolver/leases.lua
+++ b/config/knot-resolver/leases.lua
@@ -1,6 +1,10 @@
-- Load modules
+local ffi = require("ffi")
local sqlite3 = require("lsqlite3")
+-- Get access to the C interface
+local C = ffi.C
+
local DB_PATH = "/var/lib/knot-resolver/leases.db"
local TTL = 60
@@ -9,14 +13,6 @@ local db
local sql_fwd
local sql_rev
-local function log_error(s)
- print(s)
-end
-
-local function log_debug(s)
- print(s)
-end
-
-- Initializes the module
function M.init()
-- Open the database
@@ -24,7 +20,7 @@ function M.init()
-- Fail if we cannot open the database
if not db then
- log_error("leases: Failed to open " .. DB_PATH)
+ log_error(C.LOG_GRP_RESOLVER, "leases: Failed to open " .. DB_PATH)
return -1
end
@@ -129,7 +125,7 @@ function M.answer()
-- Log action
log_debug(
- string.format("Called for %s (%d)", qname, qtype)
+ C.LOG_GRP_RESOLVER, string.format("Called for %s (%d)", qname, qtype)
)
local answer = {}
hooks/post-receive
--
IPFire 2.x development tree
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-09 10:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-09 10:20 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. c791d50b483423e0ef54dc46bec638c34334348a Michael Tremer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox