Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursor: Allow setting notify_allowed when creating zone with API #14116

Closed
bakern opened this issue Apr 26, 2024 · 0 comments · Fixed by #14121
Closed

Recursor: Allow setting notify_allowed when creating zone with API #14116

bakern opened this issue Apr 26, 2024 · 0 comments · Fixed by #14121
Labels

Comments

@bakern
Copy link

bakern commented Apr 26, 2024

  • Program: Recursor
  • Issue type: Feature request

Short description

I'm not sure if this would be considered a bug or feature request. Currently when creating a new forwarding zone on Recursor using the API, setting notify_allowed has no effect. It looks to be hard-coded in the webserver. Also, the current setting is not shown when viewing zones using the API.

Usecase

I would like to create forwarding zones using the API, and have notify_allowed set to true to allow clearing the zone cache by sending a NOTIFY. I realize the cache can be cleared using the cache manipulation API endpoint, but I would prefer to make it automatically clear when the Authoritative server it is forwarding to receives a NOTIFY. So the Authoritative server (set up as Secondary) receives a NOTIFY and does an AXFR, and also using forward-notify setting it forwards the NOTIFY to the Recursor telling it to clear cache for that zone.

Code Reference

else if (kind == "FORWARDED") {
if (g_yamlSettings) {
pdns::rust::settings::rec::ForwardZone forward;
forward.zone = zonename;
forward.recurse = rdFlag;
forward.notify_allowed = false;
for (const auto& value : document["servers"].array_items()) {
forward.forwarders.emplace_back(value.string_value());
}
pdns::rust::settings::rec::api_add_forward_zone(yamlAPiZonesFile, std::move(forward));
}

Please let me know if there is a reason this should not be an option. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants