Simon PolackandClaude Opus 5.5 23912fb99f olsrd: ubus: forget an interface that is already gone
del_interface looked for the active interface (if_ifwithname) and
answered "Permission denied" when there was none. That is the normal
case when it is called from a hotplug "remove" event: the device is
gone, olsrd has seen the link go away and has taken the active
interface down by itself. The configured entry stayed in
olsr_cnf->interfaces for good.

olsrd looks at every configured interface that is not up every
NicChgsPollInt seconds (2.5 by default) with ioctl(SIOCGIFFLAGS). For a
name that does not exist, the kernel tries to load a module for it
(dev_load), twice: "netdev-<name>" and "<name>". On OpenWrt each of
these is a run of kmodloader over all modules.

A gateway with wireguard tunnels that come and go collects one such
entry per tunnel. On an EdgeRouter 4 after 24 days there were 12 of
them: 16 to 19 process starts per second, 38 million since boot, about
half of one of its four cores.

Look for the configured entry instead, take it out of the list, and
only take the interface down if it is up. An unknown name is now "Not
found".

Tested on OpenWrt 25.12 (x86_64, in a container): removing an interface
that vanished before, one that is up, an unknown one, two vanished ones
in the other order, and adding one again. The same change has been
running on an EdgeRouter 4 (mips64) gateway.

Signed-off-by: Simon Polack <spolack+git@mailbox.org>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 15:54:03 +02:00
2026-09-01 23:06:29 +02:00
2026-09-01 23:06:29 +02:00
2026-08-05 14:04:01 +02:00
2026-07-31 14:11:17 +02:00
2024-11-14 21:42:30 +01:00
2023-04-27 17:14:16 +02:00

OpenWrt Routing Feed

Description

This OpenWrt package feed contains community maintained routing packages.

Usage

This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: OpenWrt Buildroot – Installation on the OpenWrt support site.

This feed is enabled by default. To install all its package definitions, run:

./scripts/feeds update routing
./scripts/feeds install -a -p routing
S
Description
OpenWrt Routing Packages
Readme
6 MiB
0 Stars 1 Watchers 0 Forks
Languages
Lua 38.9%
Shell 28.2%
Makefile 27.9%
HTML 5%