[0/4] Use the address ddns publishes in the DDNS sync check (#14766)

Message ID 20261201143155.1798388-1-antonio@mandelbit.com
Headers
Series Use the address ddns publishes in the DDNS sync check (#14766) |

Message

Antonio Quartulli 1 Dec 2026, 2:31 p.m. UTC
With RED in 169.254.0.0/16, ddns up to 015 publishes the link-local
address, and ddns.cgi turns "Fetch the public IP" off whenever an
account changes (#12940). Both are fixed in next for Core Update 208 by
ddns 016 and ccab87695.

The web interface still checks the hosts against the RED address in
those cases, so they show as out of sync. These patches make the check
use the address that ddns 016 publishes, and only fetch it when a host
needs it.

Files to ship (I didn't touch the filelists):
- var/ipfire/network-functions.pl, var/ipfire/http-client-functions.pl
  (already in Core Update 208)
- srv/web/ipfire/cgi-bin/ddns.cgi (web-user-interface, already in 208)
- srv/web/ipfire/cgi-bin/wio.cgi: wio add-on, may need a PAK_VER bump

Suggestion for 208's update.sh: regenerate ddns.conf (e.g. by running
ddns.cgi as nobody, like dhcp.cgi), so that the #12940 fix also applies
to existing configurations without touching the page.

Antonio Quartulli (4):
  network-functions.pl: Add ip_address_is_global()
  wio.cgi: Get the address of the DDNS hosts only once
  ddns.cgi: Get the address of the DDNS hosts only when needed
  http-client-functions.pl: Use the address ddns publishes for the sync
    check

 config/cfgroot/http-client-functions.pl | 26 +++++++++-------------
 config/cfgroot/network-functions.pl     | 29 +++++++++++++++++++++++++
 html/cgi-bin/ddns.cgi                   |  6 +++--
 html/cgi-bin/wio.cgi                    |  6 ++++-
 4 files changed, 48 insertions(+), 19 deletions(-)