mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-24 18:55:55 +03:00
[GH-ISSUE #1603] [Question] Possible to send multiple DDNS updates in a single request? #708
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#708
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chenxiaolong on GitHub (Dec 9, 2021).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1603
As I understand it, with dynamic DNS, to atomically replace all A records for a host and add a new one, both the deletion and creation need to be done in the same request (assuming the server supports atomic updates). With
nsupdate, I'd do something like this:Looking at a packet capture, that gives me a single request (1 packet) with two entries in the update section:
I was able to mostly implement this using trust-dns thanks to the recent TSIG support, but it seems that each call to eg.
SyncClient::delete_rrset/create/appendsends a new request. Is there any API for sending multiple updates in a single request?Thank you!
@bluejekyll commented on GitHub (Dec 9, 2021):
Does compare and swap facilitate what you want? https://docs.rs/trust-dns-client/latest/trust_dns_client/client/trait.Client.html#method.compare_and_swap
Or do you want to blindly delete all records and add a new set? We could add a
replacemethod that does what you want.@chenxiaolong commented on GitHub (Dec 9, 2021):
Thank you, I had overlooked that method. Blind-replace-all semantics is indeed what I'm after. I'll play around and see if
query+compare_and_swapcan do the trick.(Looking at the source for
compare_and_swap, the low-leveltrust_dns_client::op::MessageAPI seems pretty straight-forward as well. Seems like I can go that route if needed.)@chenxiaolong commented on GitHub (Dec 10, 2021):
I got this working using the low level
MessageAPI and it lets me handle both A and AAAA at the same time. I'm not sure if it's worth having a high level wrapper for this--I'm perfectly happy with just usingMessage.