From 1d24ae8124caef413ecfc4b4279334967933a927 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 19 Mar 2024 12:49:14 +0100 Subject: [PATCH] rec: fix types of two YAML settings that should be sequences of subnets In particular, incoming.proxy_protocol_from and incomig.edns_padding_from --- pdns/recursordist/settings/table.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pdns/recursordist/settings/table.py b/pdns/recursordist/settings/table.py index 5028b4c5f4..70b4554289 100644 --- a/pdns/recursordist/settings/table.py +++ b/pdns/recursordist/settings/table.py @@ -864,13 +864,14 @@ Lower this if you experience timeouts. { 'name' : 'edns_padding_from', 'section' : 'incoming', - 'type' : LType.String, + 'type' : LType.ListSubnets, 'default' : '', 'help' : 'List of netmasks (proxy IP in case of proxy-protocol presence, client IP otherwise) for which EDNS padding will be enabled in responses, provided that \'edns-padding-mode\' applies', 'doc' : ''' List of netmasks (proxy IP in case of proxy-protocol presence, client IP otherwise) for which EDNS padding will be enabled in responses, provided that :ref:`setting-edns-padding-mode` applies. ''', - 'versionadded': '4.5.0' + 'versionadded' : '4.5.0', + 'versionchanged' : ('5.0.4', 'YAML settings only: previously this was defined as a string instead of a sequence') }, { 'name' : 'edns_padding_mode', @@ -2036,9 +2037,9 @@ Whether to compute the latency of responses in protobuf messages using the times { 'name' : 'proxy_protocol_from', 'section' : 'incoming', - 'type' : LType.String, + 'type' : LType.ListSubnets, 'default' : '', - 'help' : 'A Proxy Protocol header is only allowed from these subnets', + 'help' : 'A Proxy Protocol header is required from these subnets', 'doc' : ''' Ranges that are required to send a Proxy Protocol version 2 header in front of UDP and TCP queries, to pass the original source and destination addresses and ports to the recursor, as well as custom values. Queries that are not prefixed with such a header will not be accepted from clients in these ranges. Queries prefixed by headers from clients that are not listed in these ranges will be dropped. @@ -2047,7 +2048,8 @@ Note that once a Proxy Protocol header has been received, the source address fro The dnsdist docs have `more information about the PROXY protocol `_. ''', - 'versionadded': '4.4.0' + 'versionadded' : '4.4.0', + 'versionchanged' : ('5.0.4', 'YAML settings only: previously this was defined as a string instead of a sequence') }, { 'name' : 'proxy_protocol_maximum_size', -- 2.47.3