From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4gwrZH5tzWz2xQT for ; Thu, 09 Jul 2026 10:20:23 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4gwrZH5YRkz2xL0 for ; Thu, 09 Jul 2026 10:20:23 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [IPv6:2001:678:b28::161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bit raw public key) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "people01.haj.ipfire.org", Issuer "YE2" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4gwrZG5brKzdr for ; Thu, 09 Jul 2026 10:20:22 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1783592422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=EmimIPMPX0IRDCK11hD0Ynp0TKptpWhrXuZj9YKp9JI=; b=e4Z5uVq/5KkwnF9UvuIAqh8DX5R7wmc52qorTwu5PEUA96Mt3EvWrThefZ2WFoG5g83l2r dxavfjzXqGTcswDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1783592422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=EmimIPMPX0IRDCK11hD0Ynp0TKptpWhrXuZj9YKp9JI=; b=s9/nTSVvupvXxd+VrGOdJmru6B65zbQFvGN3zzaHh0NRwGKuZZ5aUuH1qsQarHA1J7uGEe yCwbBYBWP5swl4ciKi0FtEuKcMY76/qIiP4u83R0HhQTb7I83MhYifw4miomKO/HBflixp ipCyA2G1U8vr/4ts0A1tOHaZYsPw53E74BhK6Jr+UxCumXsh8o55gjTu9gjPBSL0LZ7tYT AaWvfdoh1BQo87YRwswgJprhulHZNDRsNg44pMweW3tBm1jSAEB97xhimsKB4epX37uWBU Ksf3F9HngxE6D8F25ipQzwJ6Ys4KgE4gnVu67DIOFwlagRQhnoOdb8eAXUIW8g== Received: by people01.haj.ipfire.org (Postfix, from userid 1000) id 4gwrZF4Mlpz2xQd; Thu, 09 Jul 2026 10:20:21 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. c791d50b483423e0ef54dc46bec638c34334348a X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: d1d684fcd919819cfde07e65b91bee40a6c81d5c X-Git-Newrev: c791d50b483423e0ef54dc46bec638c34334348a Message-Id: <4gwrZF4Mlpz2xQd@people01.haj.ipfire.org> Date: Thu, 09 Jul 2026 10:20:21 +0000 (UTC) From: Michael Tremer Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: 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 Date: Thu Jul 9 12:09:09 2026 +0200 knot-resolver: Force SafeSearch for mobile version of YouTube Signed-off-by: Michael Tremer commit 34aba3093a4e82db3a45f7b859fdfd6005f83346 Author: Michael Tremer 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 commit 9a2ebbc30f543403986590086306c5977939ddea Author: Michael Tremer 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 ----------------------------------------------------------------------- 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