RFC 1996 section 3.10 requires the SOA RR carrying the new zone serial
to be placed in the answer section of a NOTIFY message. BIND9's notify
processing looks for the SOA there and, when it is absent, logs that the
NOTIFY does not contain a SOA serial.
Both SendClientDNSNotify and SendNSNotify were appending the SOA RRset
to the authority section instead of the answer section, which is why
BIND9 reported the missing serial. Move the append to msg.answer in both
handlers so receivers can correctly extract the new serial.
Per PR review feedback:
- Rename settings: custom_field_force_notify -> notify_ns_custom_field_name,
force_notify_port -> notify_ns_port.
- Add notify_ns_all_zones (bool, default False) to enable the feature globally
for every zone; it coexists with the per-zone custom field — a NOTIFY is sent
if the global switch is on OR the zone's custom field is set.
- Rename the internal job/scheduler/log strings to the notify_ns naming for
consistency (SendZoneNSNotify, schedule_notify_ns).
- Update README and CHANGELOG.
- Introduced `custom_field_force_notify` setting to trigger immediate NOTIFY to a zone's nameservers when its SOA serial number changes and the custom field is set to True.
- Updated README to document the new feature and its configuration.
- Refactored notify handler to include a new job for sending forced NOTIFY messages directly to zone nameservers.
- Enhanced zone signal handling to check for SOA serial changes and trigger forced NOTIFY accordingly.
modified: netbox_dns_bridge/management/commands/dns-transfer-endpoint.py
modified: netbox_dns_bridge/request_handler.py
modified: netbox_dns_bridge/signals/netbox_dns_zones.py
Range of bug fixes and improvements
modified: __init__.py
modified: catalog_zone_manager.py
modified: dns_server.py
modified: notify_handler.py
Adding serial to notify messages to allow client to determine state.
modified: netbox_dns_bridge/notify_handler.py
modified: netbox_dns_bridge/request_handler.py
modified: netbox_dns_bridge/signals/netbox_dns_zones.py
Disable NOTIFY feature by default and add setting to enable it.