openwrt / openwrt/packages

ddns-scripts: ddns-update-netcup-com.sh is never updating ...

Open Beginner friendly
#30,387 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug release/25.12
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
  1. create a entry @ netcup dns (subdomain, AAAA, ipv6 short version i.e.: 2000:6000:4000:c000::de
  2. install netcup script
  3. configure ddns
  4. 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.