From: Daniel F. Dickinson Date: Sun, 25 Jan 2026 09:48:15 +0000 (-0500) Subject: watchcat: fix interface reset does not work X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=14e0e9e73753e2f23260edb2fd4994f68a68cdea;p=openwrt-packages.git watchcat: fix interface reset does not work As reported in #23410 Network interface reset doesn't work as expected on a Wireguard VPN interface and in #27927 lt2p interface won't reboot, and mentioned in #27248, the current implementation of the option to restart an interface when connectivity check fails for some period does not result in an interface restart for all interface. Notably 'virtual' interfaces such as Wireguard and L2TP do not restart. The solution that works is to use `ifup ` instead of only changing the link status. This commit is based on the one in #27248 by @rondoval, who unfortunately has not updated the commit message as requested for half a year. Signed-off-by: Daniel F. Dickinson --- diff --git a/utils/watchcat/Makefile b/utils/watchcat/Makefile index e93525f69..7ecf6b60e 100644 --- a/utils/watchcat/Makefile +++ b/utils/watchcat/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=watchcat PKG_VERSION:=1 -PKG_RELEASE:=20 +PKG_RELEASE:=21 PKG_MAINTAINER:=Roger D PKG_LICENSE:=GPL-2.0 diff --git a/utils/watchcat/files/watchcat.sh b/utils/watchcat/files/watchcat.sh index 0f4dca16e..0de47105c 100644 --- a/utils/watchcat/files/watchcat.sh +++ b/utils/watchcat/files/watchcat.sh @@ -83,8 +83,7 @@ watchcat_restart_modemmanager_iface() { watchcat_restart_network_iface() { logger -p daemon.info -t "watchcat[$$]" "Restarting network interface: \"$1\"." - ip link set "$1" down - ip link set "$1" up + ifup "$1" } watchcat_run_script() {