ddns-scripts: ddns-update-netcup-com.sh is never updating ...
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Package Name
ddns-scripts-netcup-com
Maintainer
(@feckert)
OpenWrt Version
25.12.5
OpenWrt Target/Subtarget
all
Steps to Reproduce
- create a entry @ netcup dns (subdomain, AAAA, ipv6 short version i.e.: 2000:6000:4000:c000::de
- install netcup script
- configure ddns
- run update
Actual Behaviour
The ddns-update-netcup-com.sh script is not updating any DNS records.
This is due to the following code sequence, which is executed in a loop for each DNS record delivered by the Netcup-API:
if [ "$__rec_type" = "$__RRTYPE" ] \
&& [ "$__rec_name" = "$__REC_HOSTNAME" ] \
&& [ "$__rec_destination" = "$REGISTERED_IP" ];` then
__MATCH_ID="$__rec_id"
write_log 7 "netcup DDNS: matched record id=$__MATCH_ID"
break
fi
If, for example, the IPv6 address 2000:6000:4000:c000::de is stored at Netcup, the variable $__rec_destination contains the value 2000:6000:4000:c000::de However, the variable $REGISTERED_IP contains 2000:6000:4000:c000:0000:0000:0000:00de
In my opinion, comparing the IPs in the if statement is generaly pointless, as this prevents an update in all cases.
Maybe its helpful to avoid useless updates. But $REGISTERED_IP is not useful here ...
I have replaced the existing statement with a nested if statement (for performance reasons).
if [ "$__rec_type" = "$__RRTYPE" ]; then
# compare hostname only if type always matches
if [ "$__rec_name" = "$__REC_HOSTNAME" ]; then
__MATCH_ID="$__rec_id"
write_log 7 "netcup DDNS: matched record id=$__MATCH_ID"
break
fi
fi
Confirmation Checklist
- The package is maintained in this repository.
- I understand that issues related to the base OpenWrt repository or LuCI repository will be closed.
- I am reporting an issue for OpenWrt, not an unsupported fork.
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 with ddns-update-netcup-com.sh and reproduce the Netcup DNS update using an IPv6 address in compressed form. Check the record-matching logic and any existing package tests or update logs; done means the script finds the existing record and updates it correctly without preventing other record updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100