-
Notifications
You must be signed in to change notification settings - Fork 993
ReursorAuth scope /0 problem #16803
Copy link
Copy link
Open
Description
- Program: Recursor
- Issue type: Bug report
Short description
I have recursor --> pdns auth(with views enabled)
ClientIP is passed via EDNS
The problem is first request from 127.0.0.1 for domain is cached, and if client for different View (internal) 10.0.0.0/8 is asking for record Recursor responds with cached request for wrong view
Recursor config
incoming:
listen:
- 0.0.0.0
port: 54
allow_from:
- 0.0.0.0/0
use_incoming_edns_subnet: true
recordcache:
max_ttl: 86400
max_negative_ttl: 10
packetcache:
disable: true
outgoing:
edns_subnet_allow_list:
- 0.0.0.0/0
ecs:
add_for:
- 0.0.0.0/0
ipv4_cache_bits: 24
ipv4_bits: 24
Auth Config
cache-ttl: "0"
negquery-cache-ttl: "0"
query-cache-ttl: "0"
views: "yes"
zone-cache-refresh-interval: "300"
edns-subnet-processing: "yes"
Environment
- Operating system: Ubuntu 22.04 LTS
- Software version: PowerDNS 5.0.2, Recursor 5.3.4
- Software source: PowerDNS repository
Steps to reproduce
- Create zone example.com
- Create view for example.com_internal - subnet 10.0.0.0/8
- Create record test.example.com - A 10.0.0.1 for default zone view (0.0.0.0/0)
- Create record test.example.com A 10.0.0.2 for _internal zone view (10.0.0.0/8)
Expected behaviour
- Ask record for test.example.com from 127.0.0.1 - getting 10.0.0.1 as expected
- Ask record for test.example.com from 10.14.0.1 - getting 10.0.0.2 as expected
Actual behaviour
- Ask record for test.example.com from 127.0.0.1 - getting 10.0.0.1 as expected
- Ask record for test.example.com from 10.14.0.1 - getting 10.0.0.1 (cached) should answer 10.0.0.2
- Cache expires ask test.example.com from 10.14.0.1 - getting 10.0.0.2 as expected
- Ask record for test.example.com from 127.0.0.1 - getting 10.0.0.1 as expected... becase it first got not /0 scope
Other information
If i ask PDNS Auth directly - it answers as expected
I think the problem is PDNS Auth returns CLIENT-SUBNET for default view as scope /0, so Recursor cache it and answer for all clients
tried ipv4_never_cache still cache default view if first answered
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels