Expand description
Dynamic DNS update utilities for BIND9 via RFC 2136.
This module provides functionality for updating DNS records in BIND9 using:
- Direct DNS updates via hickory-client (TCP port 53, RFC 2136)
- Zone operations via bindcar HTTP API
It includes:
- Hash calculation for change detection
- Direct DNS update functions using hickory-client
- Zone transfer triggering via bindcar API
§Architecture
Record reconcilers use this module to:
- Calculate hash of current record data
- Compare with last known hash in
status.record_hash - If hash changed, send RFC 2136 update to BIND9 via hickory-client
- Update sent directly to primary BIND9 instance (TCP port 53)
- BIND9 handles zone transfer to secondaries automatically
§Example
use bindy::ddns::calculate_record_hash;
use bindy::crd::ARecordSpec;
let spec = ARecordSpec {
name: "www".to_string(),
ipv4_addresses: vec!["192.0.2.1".to_string()],
ttl: Some(300),
};
// Calculate current hash
let current_hash = calculate_record_hash(&spec);
// hash is a 64-character hex string
assert_eq!(current_hash.len(), 64);Functions§
- calculate_
record_ hash - Calculate SHA-256 hash of a record’s data fields.