DDNS doesn't show correctly the Last/Next update times

I am using OpenWRT (version 21.02.3) on my Linksys WRT1200AC router and have installed and configured the DDNS service for 4 different hostnames on two different DDNS providers with a check interval of two hours. All works as expected and all four hostnames get updated promptly and correctly. The only glitch is that the Last/Next Update date/times shown in Luci are wrong. Both are dynamic, changing constantly - the Last update shows the current date/time and the Next update has a non-constant offset from that one (it's roughly 12 hrs ahead of now with some minutes being subtracted or added at each change).

The log file shows no errors and looks as expected - see following excerpt:

 094151  info : Rerun IP check at 2022-05-02 09:41
 094151       : Detect local IP on 'network'
 094151       : Local IP '94.153.170.31' detected on network 'wan'
 094151       : Waiting 7200 seconds (Check Interval)
 114151       : Detect registered/public IP
 114151       : #> /usr/bin/nslookup [hostname redacted out]  >/var/run/ddns/NoIP_split.dat 2>/var/run/ddns/NoIP_split.err
 114151       : Registered IP '94.153.170.31' detected
 114151  info : Rerun IP check at 2022-05-02 11:41
 114151       : Detect local IP on 'network'
 114151       : Local IP '94.153.170.31' detected on network 'wan'
 114151       : Waiting 7200 seconds (Check Interval)
 134151       : Detect registered/public IP
 134151       : #> /usr/bin/nslookup [hostname redacted out]  >/var/run/ddns/NoIP_split.dat 2>/var/run/ddns/NoIP_split.err
 134151       : Registered IP '94.253.170.31' detected
 134151  info : Rerun IP check at 2022-05-02 13:41
 134151       : Detect local IP on 'network'
 134151       : Local IP '94.153.170.31' detected on network 'wan'
 134151       : Waiting 7200 seconds (Check Interval)

The main functionality does not seem to be affected, so this is not critical, but it is annoying. Any ideas how to correct it?

seems weird there'd be a next update, since the router can't know when your IP's going to change ...

You are right. Both last and next should be called check rather than update.

Just found the solution here: DDNS Luci showing wrong last/next update date/time - #5 by apocalypse. Many thanks to user Apocalipse for pointing me to the solution and to Github user small_5 for committing the correction..
Even though the solution was committed on Github more than a year ago, the current usr/libexec/rpcd/luci.ddns (from OpenWrt 21.02.3 r16554-1d4dea6d4f / LuCI openwrt-21.02 branch git-22.119.37126-a993714) still does not have it implemented. I have therefore amended the file myself and now all works as it should. BTW, after having seen the code logic, perhaps the word update is correct after all :wink:.

1 Like

Are you running the version of LuCI that was default in 21.02.3?

Yes, I am. Well, except for the edit I've done to usr/libexec/rpcd/luci.ddns, following the content of the article I quoted above.

Odd, mine is: LuCI openwrt-21.02 branch (git-22.083.69138-0a0ce2a)

Come to think of it, I might have installed an update after upgrading to 21.02.3. Really not sure and don't know how to check, but if you run the opkg update and see a luci item available there, then that's what I would have installed.

You can see what you've installed by running opkg list-installed

I meant I don't know how to see when I installed what package. To see if I added anything after upgrading to 21.02.3.

I usually run opkg list-installed and save the output to a text file (with a unique file name) whenever I make package changes, or before an upgrade.

I use a file compare app to see the differences. Date and time stamp of the files are the history.

I do the same thing with config backups.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.