[PATCH] net ads dns register does not delete old AAAA records

Sheppard, Martin (IM&T, Waite Campus) Martin.Sheppard at csiro.au
Fri Aug 9 04:43:09 UTC 2019


Net ads dns register has a bug where it will delete all the existing A records before registering new A and AAAA records in dynamic DNS, but it doesn't delete existing AAAA records. Therefore, the IPv6 addresses for a machine can build up and old ones may never be cleaned up.

Windows will send a Dynamic DNS Update packet that looks like:
- Ensure No CNAME Records exist for the name (abort update if they do)
- Delete any existing A Records
- Delete any existing AAAA Records
- Add list of current A Records
- Add list of current AAAA Records

Samba sends the same packet, except it is missing the "Delete any existing AAAA Records" command in the packet. 

The attached patch adds the extra command into the packet and allows old IPv6 addresses to be removed just like IPv4 addresses are already. I have built and tested the patch and it has the desired effect on the resulting DNS entries in a Windows domain. 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: dyndns-AAAA-delete.patch
Type: application/octet-stream
Size: 666 bytes
Desc: dyndns-AAAA-delete.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190809/bda5715f/dyndns-AAAA-delete.obj>

More information about the samba-technical mailing list