From: Lukáš Ondráček Date: Tue, 30 Jul 2024 15:05:47 +0000 (+0200) Subject: Merge branch 'master' into rrl-wip X-Git-Tag: v6.0.9~1^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fenvironments%2Fdocs-develop-rrl-8r8r8r%2Fdeployments%2F4736;p=thirdparty%2Fknot-resolver.git Merge branch 'master' into rrl-wip --- 6834751d0f1e943d4b0db19a86f52fe45d9a9105 diff --cc daemon/main.c index 95df2e5a3,44b8ae4c1..d18f59f90 --- a/daemon/main.c +++ b/daemon/main.c @@@ -11,13 -11,7 +11,9 @@@ #include "daemon/network.h" #include "daemon/udp_queue.h" #include "daemon/worker.h" +#include "daemon/ratelimiting.h" +#include "daemon/defer.h" - #ifdef ENABLE_DOH2 - #include "daemon/http.h" - #endif - #include "lib/defines.h" #include "lib/dnssec.h" #include "lib/log.h" diff --cc daemon/proxyv2.h index 9bba34762,d514cd627..8f16ea104 --- a/daemon/proxyv2.h +++ b/daemon/proxyv2.h @@@ -30,10 -30,3 +30,7 @@@ struct proxy_result * the proxy is unencrypted. */ bool has_tls : 1; }; + +/** Checks whether the use of PROXYv2 protocol is allowed for the specified + * address. */ +bool proxy_allowed(const struct sockaddr *saddr); - - /** Initializes the protocol layers managed by the PROXYv2 "module". */ - void proxy_protolayers_init(void); diff --cc manager/knot_resolver_manager/datamodel/config_schema.py index 9da7007eb,353712310..d80f664a3 --- a/manager/knot_resolver_manager/datamodel/config_schema.py +++ b/manager/knot_resolver_manager/datamodel/config_schema.py @@@ -21,9 -21,9 +21,10 @@@ from knot_resolver_manager.datamodel.te from knot_resolver_manager.datamodel.types import Dir, EscapedStr, IntPositive from knot_resolver_manager.datamodel.view_schema import ViewSchema from knot_resolver_manager.datamodel.webmgmt_schema import WebmgmtSchema +from knot_resolver_manager.datamodel.rate_limiting_schema import RateLimitingSchema from knot_resolver_manager.utils.modeling import ConfigSchema from knot_resolver_manager.utils.modeling.base_schema import lazy_default + from knot_resolver_manager.utils.modeling.exceptions import AggregateDataValidationError, DataValidationError _DEFAULT_RUNDIR = "/var/run/knot-resolver" diff --cc manager/knot_resolver_manager/kres_manager.py index 8cfd73c8f,f916dfaaa..dbe56817c --- a/manager/knot_resolver_manager/kres_manager.py +++ b/manager/knot_resolver_manager/kres_manager.py @@@ -2,12 -2,12 +2,13 @@@ import asynci import logging import sys import time +import os + from secrets import token_hex from subprocess import SubprocessError - from typing import Callable, List, Optional + from typing import Any, Callable, List, Optional from knot_resolver_manager.compat.asyncio import create_task - from knot_resolver_manager.config_store import ConfigStore + from knot_resolver_manager.config_store import ConfigStore, only_on_real_changes_update, only_on_real_changes_verifier from knot_resolver_manager.constants import ( FIX_COUNTER_DECREASE_INTERVAL_SEC, MANAGER_FIX_ATTEMPT_MAX_COUNTER,