Skip to content

watchcat: l2tp interface won't reboot in mode:restart_iface #27927

@vdmorozov

Description

@vdmorozov

Package Name

watchcat

Maintainer

@roger-

OpenWrt Version

24.10.4

OpenWrt Target/Subtarget

mediatek/filogic

Steps to Reproduce

  1. Set up an L2TP interface via xl2tpd
  2. Set up watchcat to reboot this interface in case ping checks through it fail
  3. Expect the interface to auto-start once it's stopped manually

Here's the interface:

> ip a
...
l2tp-beeline: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1460 qdisc fq_codel state UNKNOWN group default qlen 3
    link/ppp 
    inet XXX.XXX.XXX.XXX peer XXX.XXX.XXX.XXX scope global l2tp-beeline
       valid_lft forever preferred_lft forever
...

/etc/config/watchcat:

config watchcat
	option mode 'restart_iface'
	option period '60s'
	option pinghosts 'l2tp.internet.beeline.kz'
	option addressfamily 'any'
	option pingperiod '20s'
	option pingsize 'standard'
	option interface 'l2tp-beeline'

Actual Behaviour

The l2tp-beeline interface won't start after reaching the configured period of unavailability (60s).

Logs:

Sun Nov 23 14:52:55 2025 daemon.info watchcat[17902]: Could not reach l2tp.internet.beeline.kz via "l2tp-beeline" for "20" seconds. Restarting "l2tp-beeline" after reaching "60" seconds
Sun Nov 23 14:53:15 2025 daemon.info watchcat[17902]: Could not reach l2tp.internet.beeline.kz via "l2tp-beeline" for "40" seconds. Restarting "l2tp-beeline" after reaching "60" seconds
Sun Nov 23 14:53:35 2025 daemon.info watchcat[17902]: Could not reach l2tp.internet.beeline.kz via "l2tp-beeline" for "60" seconds. Restarting "l2tp-beeline" after reaching "60" seconds
Sun Nov 23 14:53:35 2025 daemon.info watchcat[17902]: Restarting network interface: "l2tp-beeline".
Sun Nov 23 14:53:54 2025 daemon.info watchcat[17902]: Could not reach l2tp.internet.beeline.kz via "l2tp-beeline" for "20" seconds. Restarting "l2tp-beeline" after reaching "60" seconds

It seems if up/down doesn't work with L2TP interfaces:

watchcat_restart_network_iface() {
	logger -p daemon.info -t "watchcat[$$]" "Restarting network interface: \"$1\"."
	ip link set "$1" down
	ip link set "$1" up
}

Would it be applicable to use /sbin/ifup and /sbin/ifdown instead?

Confirmation Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions