watchcat: fix interface reset does not work
authorDaniel F. Dickinson <redacted>
Sun, 25 Jan 2026 09:48:15 +0000 (04:48 -0500)
committerHannu Nyman <redacted>
Tue, 3 Mar 2026 18:06:13 +0000 (20:06 +0200)
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 <interface>` 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 <redacted>
utils/watchcat/Makefile
utils/watchcat/files/watchcat.sh

index e93525f69e8e2160947812b065e25f37851358f4..7ecf6b60e762184dc56b9275a2b977e2a0ee6551 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=watchcat
 PKG_VERSION:=1
-PKG_RELEASE:=20
+PKG_RELEASE:=21
 
 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
 PKG_LICENSE:=GPL-2.0
index 0f4dca16e90cd5926d307e981cd121bf640ae67a..0de47105cd1172caf4f275377f345ec35a185661 100644 (file)
@@ -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() {
git clone https://git.99rst.org/PROJECT