ddns-scripts: update hotplug script

To handle ip address changing by ifupdate.
When the ipv6 address is updated for an interface
(some ISP only give dynamic ipv6 address).
The ddns script will go into dead loop,
as the new ipv6 address is not used.
The simple change is restarting ddns when ip address is changed.

Signed-off-by: Jimmy Qin <sunnyqeen@gmail.com>
pull/30470/head
Jimmy Qin 2026-02-13 20:25:40 +01:00 committed by Florian Eckert
parent 4c19a2ea6b
commit 889e134007
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ddns-scripts
PKG_VERSION:=2.8.4
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_LICENSE:=GPL-2.0

View File

@ -38,4 +38,10 @@ case "$ACTION" in
ifdown)
ddns_service "ifdown" "$INTERFACE"
;;
ifupdate)
[ -z "$IFUPDATE_ADDRESSES" ] && exit 0
ddns_service "ifdown" "$INTERFACE"
sleep 1 # give time to shutdown
/etc/init.d/ddns enabled && ddns_service "ifup" "$INTERFACE"
;;
esac