dns/ddclient: Add __IPV6PREFIX__ replace for custom urls #4518
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of the DynDNS providers allow setting an IPv6 prefix. So you can have multiple hosts updated at the same time, if they are within the same network/prefix.
For example:
https://ipv64.net/dyndns_updater_api
https://dynv6.com/docs/apis#update
Currently I am using the DYNDNS2 custom URL/custom GET to update the IPv6 prefix at my DNS provider. The API offers parameters like ipv6prefix=auto to auto detect the IPv6 prefix. Unfortunately I can not use the auto parameter because I have different prefixes on WAN and LAN. I assume these are called IA_PD and IA_NA. But probably there are other use cases to this, for example if you have multiple LAN segments with different prefixes. So I want to explicitly define the prefix which shall be used.
The idea is to add a replacement tag __IPV6PREFIX__ for custom URLs. Just like __MYIP__ which is already present.
As the __MYIP__ is taken from the "Interface to track" this should use IP address of the interface to determine the correct IPv6 prefix.
The replacement will only be done, if the IP address is IPv6.
This relates to #3558 and will add the possibility to add IPv6 Prefix updates. Unfortunately the update will only work using custom URLs with this change.