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: NEW
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: ---
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-08-27 12:54 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.