Bug 14244 - IPv6 addresses are not deleted from Dynamic DNS when no longer in use
Summary: IPv6 addresses are not deleted from Dynamic DNS when no longer in use
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: 4.14
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-21 03:53 UTC by martin.sheppard
Modified: 2020-12-23 16:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martin.sheppard 2020-01-21 03:53:46 UTC
Net ads dns register (any any other triggered dynamic DNS updates) have 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.

To trigger this bug you can do something like

net ads dns register hostname 127.0.0.1 fd45:ad37:1e2c:b1f6:0000:0000:0000:0001
net ads dns register hostname 127.0.0.2 fd45:ad37:1e2c:b1f6:0000:0000:0000:0002

After running these commands you’ll find three addresses registered in DNS:

127.0.0.2, fd45:ad37:1e2c:b1f6:0000:0000:0000:0001, fd45:ad37:1e2c:b1f6:0000:0000:0000:0002

But only 127.0.0.2 and fd45:ad37:1e2c:b1f6:0000:0000:0000:0002 should be registered. fd45:ad37:1e2c:b1f6:0000:0000:0000:0001 should not.
Comment 1 Samba QA Contact 2020-12-23 13:53:11 UTC
This bug was referenced in samba master:

985042d391e8124b157f21a6041ff9e17188483a