ddns-scripts: Setting a custom IPv6 `dns_server` is not possible
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
This check blocks IPv6 addresses in the configuration option dns_server '[2606:4700:4700::1111]':
https://github.com/openwrt/packages/blob/7e88aaacbd26f7a59eb4ffe58626ccb694e3c794/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh#L259
Adapting that check will however still leave a the separate issue that GNU netcat does not accept IPv6 addresses:
https://github.com/openwrt/packages/blob/7e88aaacbd26f7a59eb4ffe58626ccb694e3c794/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh#L591
root@FB3370:~# nc -v [2606:4700:4700::1111] 53
Error: Couldn't resolve host "[2606:4700:4700::1111]"
The workaround for that is to uninstall the netcat package and fall back to the busybox variant. Using something like socat might be the better option? If we don´t want to introduce that as a hard dependency then maybe using a check if that is installed?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh around line 259 and inspect the IPv6 validation, then review dynamic_dns_functions.sh around line 591 for the netcat invocation. Confirm how the available netcat variants handle bracketed IPv6 addresses and define a working path for custom IPv6 DNS servers without requiring an unmentioned package change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100