Skip to content

olsrd: add new package - #30170

Merged
PolynomialDivision merged 7 commits into
openwrt:masterfrom
BKPepe:add-olsrd
Aug 13, 2026
Merged

olsrd: add new package#30170
PolynomialDivision merged 7 commits into
openwrt:masterfrom
BKPepe:add-olsrd

Conversation

@BKPepe

@BKPepe BKPepe commented Aug 6, 2026

Copy link
Copy Markdown
Member

Adds olsrd from the openwrt/routing feed — the routing packages are being moved into openwrt/packages one by one, as discussed in openwrt/routing#184.

Includes the plugin SONAME fix (also submitted upstream as OLSR/olsrd#137), the CI test-version.sh and the Makefile cleanup pending in openwrt/routing#1191.

The content matches the current routing feed master. Once this is merged, the package will be removed from the routing feed (a coordinated removal PR is prepared there).

Maintainer: @PolynomialDivision

Copilot AI lite review requested due to automatic review settings August 6, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment on lines +1 to +12
From 4dabd94d598dd893aaaffbd71c315923c8827a14 Mon Sep 17 00:00:00 2001
From: Nick Hainke <vincent@systemli.org>
Date: Wed, 22 Jun 2022 14:08:04 +0200
Subject: [PATCH] olsrd: prevent storm patches

As described in the PR:

Limit the positive sequence number difference which is considered valid,
and prevent network storms.
Source: https://github.com/aredn/aredn_packages/pull/5

Signed-off-by: Nick Hainke <vincent@systemli.org>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PolynomialDivision Can you please upstream this patch? There is this issue: OLSR/olsrd#106 (comment)

Comment on lines +1 to +4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nick Hainke <vincent@systemli.org>
Date: Sat, 15 Jan 2022 08:37:37 +0100
Subject: [PATCH] add ubus ipc integration

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch was added in openwrt/routing#774 by @PolynomialDivision. Any chance to upstream this?

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit (c00dcbd, olsrd: add new package). The commit message matches what the diff does, the Makefile follows the indentation conventions (two spaces for metadata blocks, tabs for install recipes, no indentation in conffiles), literal package names are used in the BuildPackage calls, the SUBDIRS list matches the 19 olsrd-mod-* subpackages one-for-one, and test-version.sh avoids grep -q as required. ./src/src/ubus.{c,h} land in the build tree via package-defaults.mk:68 before Build/Patch, so patch 600 applies cleanly against them.

Findings, in the order I'd act on them:

Likely blockers

  • olsrd-neigh.sh evals hostnames and IPs that arrive from other mesh nodes via the nameservice plugin — remote command injection.
  • olsrd-utils is missing +jshn; the script cannot run at all without it.
  • olsrd6.init reads the wrong UCI option name, so respawn_threshold is ignored.
  • ubus.c leaves mult->next uninitialized before the pointer is published into a list olsrd traverses.

Worth deciding as part of the move

  • The default olsrd_secure_key is a publicly known placeholder shipped as a conffile.
  • The unconditional +iptables dependency only feeds firewall3-era chains that firewall4 does not create.

Most of these are inherited from the routing feed rather than introduced here, but a package re-entering this repo seems like the right moment to deal with them. CI is queued/green at this SHA, so nothing to report from there.


Generated by Claude Code

Comment thread net/olsrd/files/olsrd6.init Outdated
local _respawn_timeout
local _respawn_retry

config_get _respawn_threshold procd _respawn_threshold 3600

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UCI option is spelled respawn_threshold (no leading underscore) — see files/olsrd6.config:14 and the two config_get lines right below this one. As written the lookup never matches, so a user-configured respawn_threshold is silently ignored and the default 3600 is always used. olsrd4.init:49 has the correct name.

Suggested change
config_get _respawn_threshold procd _respawn_threshold 3600
config_get _respawn_threshold procd respawn_threshold 3600

Generated by Claude Code

Comment thread net/olsrd/Makefile Outdated

define Package/olsrd-utils
$(call Package/olsrd/template)
DEPENDS:=olsrd

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

olsrd-utils ships only olsrd-neigh.sh, whose third line is . /usr/share/libubox/jshn.sh. That file comes from the jshn package (package/libs/libubox/Makefile, Package/jshn/install), which is not pulled in by olsrdlibubuslibubox. Installing olsrd-utils on a minimal image gives olsrd-neigh: not found on the very first line.

Suggested change
DEPENDS:=olsrd
DEPENDS:=olsrd +jshn

Generated by Claude Code

Comment on lines +50 to +55
ip="$1"
hostname="$2"

# global vars, e.g.
# IP_1_2_3_4='foo' or IP_2001_ffff_ffff_ffff__1='bar'
eval IP_${ip//[.:]/_}="$hostname"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Command injection: eval re-parses the string after the quotes have already been consumed by the first expansion pass, so eval IP_1_2_3_4="$hostname" with hostname = x;reboot evaluates as IP_1_2_3_4=x;reboot.

The values come from the nameservice plugin's hosts file (/var/run/hosts_olsr by default), which is populated from hostnames announced by other nodes in the mesh — i.e. a remote, unauthenticated input. $ip is interpolated into the variable name on the same line and is equally unchecked, and line 99 does the same with remoteIP taken from the txtinfo JSON.

Please reject anything that isn't a plain hostname/IP before it reaches eval, e.g. a guard in the [0-9]*) branch:

case "$ip$hostname" in *[!A-Za-z0-9.:_-]*) continue ;; esac

and the same filter on remoteIP before the eval at line 99.


Generated by Claude Code

Comment thread net/olsrd/src/src/ubus.c
Comment on lines +77 to +87
struct olsr_lq_mult *mult = malloc(sizeof(*mult));
if (mult == NULL) {
olsr_syslog(OLSR_LOG_ERR, "Out of memory (LQ multiplier).\n");
return UBUS_STATUS_UNKNOWN_ERROR;
}

double lqm_value = atof(lqm);
mult->addr = addr;
mult->value = (uint32_t)(lqm_value * LINK_LOSS_MULTIPLIER);
tmp_ifs->cnf->lq_mult = mult;
tmp_ifs->cnf->orig_lq_mult_cnt++;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three problems in this block:

  1. mult->next is never assigned. malloc() does not zero, and only ->addr and ->value are set. cnf->lq_mult is a singly-linked list that olsrd walks with for (mult = ...; mult != NULL; mult = mult->next), so the first traversal follows an uninitialized pointer. Note the preceding *tmp_ifs->cnf = *olsr_cnf->interface_defaults; is a shallow copy, so the defaults' lq_mult head is already in tmp_ifs->cnf->lq_mult at this point — either chain onto it (mult->next = tmp_ifs->cnf->lq_mult;) or terminate the new list explicitly (mult->next = NULL;) before the assignment on the next line. Whichever is intended, it has to be set.

  2. orig_lq_mult_cnt++ is inconsistent with replacing the head. The count is inherited from interface_defaults by the shallow copy and then incremented, but lq_mult is overwritten with a one-element list. If the intent is a single multiplier, this should be = 1; if the intent is to prepend, see (1).

  3. atof(lqm) on unvalidated ubus input. lqm is an arbitrary caller-supplied string; atof returns 0 on garbage with no way to tell it apart from a legitimate "0", and a negative or very large value makes (uint32_t)(lqm_value * LINK_LOSS_MULTIPLIER) undefined/wrapped. Please use strtod with endptr checking and clamp to the valid 0.0 … 1.0 multiplier range, returning UBUS_STATUS_INVALID_ARGUMENT otherwise.


Generated by Claude Code

@@ -0,0 +1 @@
1234567890123456

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ships a hardcoded, publicly known shared secret (1234567890123456) as the default key for olsrd-mod-secure, and it is registered as a conffile, so it survives upgrades once installed. The whole point of that plugin is authenticating OLSR messages within a routing domain; every device that installs the package with the default in place accepts and produces signatures anyone can forge, which is arguably worse than not loading the plugin at all.

I realise this comes over unchanged from the routing feed, but since the package is being (re-)introduced here it seems worth fixing rather than carrying forward. Two options that avoid shipping a usable-looking default: drop the file from the package and have the plugin fail to start until the admin creates it, or generate a random key in a Package/olsrd-mod-secure/postinst / uci-defaults script. At minimum the file should say in a comment that it is a placeholder that must be replaced.


Generated by Claude Code

@DamisDorgon DamisDorgon Aug 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use olsrd-mod-secure, but it looks like the key is there as an example placeholder. No one is expected to use it as is. If they want that feature, they are expected to know that some secret key material is going to be needed and to supply it, at least that's what I'd expect. A random key sounds dumb, since it needs to be shared between neighbors (?) and generating local random keys isn't going do that. Also, it is probably bad practice to generate secrets on embedded devices with (in general) not very good entropy sources, although maybe the low entropy will result in neighbors generating the same random key, so maybe it all works in the end.

See: https://github.com/OLSR/olsrd/blob/master/lib/secure/README_SECURE

Comment thread net/olsrd/Makefile
define Package/olsrd
$(call Package/olsrd/template)
MENU:=1
DEPENDS:=+libpthread +libubus +iptables +IPV6:ip6tables

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the hard +iptables / +IPV6:ip6tables dependency still wanted? The only consumer is olsrd_setup_smartgw_rules() in files/olsrd.sh:749-816, and every rule it inserts targets the firewall3 chains forwarding_rule, input_rule and postrouting_rule. firewall4 (default since 22.03) does not create those chains, so on a stock image the inserts fail with "No chain/target/match by that name" while the dependency still drags legacy iptables onto every device that installs olsrd — including the ones that never enable SmartGateway.

If SmartGateway is still expected to work, the rules need an nftables path; if it is effectively dead, the dependency could at least be relaxed so olsrd doesn't pull iptables in unconditionally. Either way it would be good to decide this as part of the move rather than inherit it.


Generated by Claude Code

Comment thread net/olsrd/src/src/ubus.h
*
* @return if initializing ubus was successful
*/
bool olsrd_add_ubus();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: bool olsrd_add_ubus(); declares an unprototyped function (pre-C23 empty parens accept any arguments) — the sibling declarations below correctly take explicit parameters, and olsrd_ubus_init(void) in ubus.c uses void. Same for the definition at ubus.c:219 and ubus_init_object() at ubus.c:179.

Suggested change
bool olsrd_add_ubus();
bool olsrd_add_ubus(void);

nit (separate): neither ubus.c nor ubus.h carries a copyright/licence header, while every other file under olsrd's src/ has the full BSD-3-Clause block that PKG_LICENSE:=BSD-3-Clause refers to. Since these two files are added by this feed rather than coming from the tarball, adding at least an SPDX line would make their licence unambiguous.


Generated by Claude Code

olsrd is the olsr.org implementation of the Optimized Link
State Routing protocol, together with its plugins packaged as
olsrd-mod-* subpackages.

Moved from the openwrt/routing feed, as discussed in
openwrt/routing#184.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
BKPepe and others added 4 commits August 6, 2026 12:39
The UCI option is spelled respawn_threshold, as documented in
files/olsrd6.config and as read by files/olsrd4.init, but the IPv6
init script looks up _respawn_threshold. The lookup never matches,
so a user-configured value is silently ignored and the built-in
default of 3600 is always used.

Reported-by: openwrt-ai[bot]
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The only file shipped by olsrd-utils is olsrd-neigh.sh, which
sources /usr/share/libubox/jshn.sh on its third line. That file
belongs to the jshn package, which is not pulled in by the
olsrd -> libubus -> libubox dependency chain, so on a minimal image
the utility fails immediately with "not found".

Reported-by: openwrt-ai[bot]
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The ubus add_interface handler allocates a struct olsr_lq_mult with
malloc() and assigns only ->addr and ->value, leaving ->next
uninitialized before the node is published into cnf->lq_mult. olsrd
walks that list with

    for (mult = cnf->lq_mult; mult != NULL; mult = mult->next)

so the first traversal follows an indeterminate pointer.

Chain the new node onto the existing list, which is what the
configuration file parser does for LinkQualityMult in
src/cfgparser/oparse.y. This also makes the orig_lq_mult_cnt++ on
the next line consistent, since the entry really is prepended to the
list instead of replacing it.

Reported-by: openwrt-ai[bot]
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
olsrd-neigh.sh builds shell variable names from data announced by
other nodes in the mesh and passes them through eval:

    eval IP_${ip//[.:]/_}="$hostname"

eval re-parses the string after the quotes have been consumed by the
first expansion pass, so a hostname of `x;reboot` announced by a
remote node is executed as a command on every node that runs the
utility. The values come from the nameservice plugin's hosts file
and from the txtinfo plugin, both of which carry unauthenticated
remote input.

Discard entries containing anything other than the characters that
can legitimately appear in an address or hostname before they reach
eval, in both places.

Reported-by: openwrt-ai[bot]
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.

Since c00dcbd the only change is the hunk header in 103-make-set-plugin-SONAME-to-the-installed-filename.patch gaining its LIBS += -lrt function context. That matches what make package/olsrd/refresh produces — OpenWrt's quilt wrapper runs with QUILT_DIFF_OPTS="-p" in include/quilt.mk:173 — so the patch is now consistent with the other two. The context-less hunks remaining in 102 and 600 are all anchored on #include / #define blocks, where diff -p has no preceding line to pick up, so those are correct as-is. The commit subject and body still describe what the diff does.

My earlier comments on olsrd-neigh.sh, olsrd6.init, the +jshn dependency, ubus.c, olsrd_secure_key and the +iptables dependency are untouched by this push and still stand. FormalityCheck is green at this SHA, with the umbrella job still queued.


Generated by Claude Code

@BKPepe

BKPepe commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Thanks for the thorough review — that is a genuinely useful list. I have pushed four fixes on top of the move commit, keeping the move itself verbatim so it stays reviewable:

  • c8eebeerespawn_threshold lookup in olsrd6.init (the _respawn_threshold typo).
  • 4d027db+jshn for olsrd-utils.
  • 1d68696mult->next in src/src/ubus.c. I chained the new node onto the existing list rather than terminating it with NULL, which is what the config file parser does for LinkQualityMult in src/cfgparser/oparse.y:123; that also makes the orig_lq_mult_cnt++ on the next line correct, since the entry really is prepended now.
  • d47c0f4 — the eval injection in olsrd-neigh.sh, guarded in both places (the hosts file loop and remoteIP from the txtinfo JSON).

Two I would rather not decide unilaterally, both for @PolynomialDivision as maintainer:

olsrd_secure_key — you are right that shipping 1234567890123456 as a registered conffile is worse than shipping nothing, since it looks configured. Generating a random key in a uci-defaults script is the option I would pick (it keeps the package working out of the box while making every node's key unique), but that changes behaviour for existing installations on upgrade, so it needs the maintainer's call rather than mine.

+iptables / +IPV6:ip6tables — agreed the fw3 chains are dead on a fw4 image. Whether to port olsrd_setup_smartgw_rules() to nftables or relax the dependency depends on whether SmartGateway still has users, which I cannot tell from here.

I have deliberately left atof() in ubus.c alone for now — worth hardening as you say, but it is a behaviour change on the ubus API surface rather than a memory-safety issue, so it seemed better kept separate from the move.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 new commits (c8eebee4715213).

The four fixes themselves look right:

  • c8eebeeolsrd6.init:49 now reads respawn_threshold and matches olsrd4.init:49 and olsrd6.config:14.
  • 1d68696mult->next is set before the node is published, and prepending keeps orig_lq_mult_cnt++ honest. Chaining onto the head inherited from the shallow *tmp_ifs->cnf = *olsr_cnf->interface_defaults; copy is the same aliasing the no-lqm path already has, so nothing new there.
  • d47c0f4 — both guards sit on the right side of the trust boundary. $ip and $hostname at olsrd-neigh.sh:60 and $remoteIP at line 110 are the only values consumed by the first expansion pass; the other evals in that loop only expand their values inside the second pass, where a ; in the result is not re-parsed as a separator. Filtering these two covers it.
  • 4715213 — passing VERS lets test-version.sh check the real PKG_VERSION (2024.06.09~d72be9ad, per download.mk:13) instead of just the olsr.org banner, and it still avoids grep -q.

One thing to fix before merge, inline on the Makefile: 4715213 silently reverts the +jshn dependency 4d027db added.

4d027db is left with an empty diff at head, so it and 4715213 probably want squashing or rewording either way.

Commit checks

  • 4715213 "olsrd: report the packaged version in the binary" — the diff also contains a second, undocumented Makefile hunk reverting olsrd-utils' +jshn dependency. Subject and body describe only the VERS / test-version.sh change.

Generated by Claude Code

Comment thread net/olsrd/Makefile Outdated

define Package/olsrd-utils
$(call Package/olsrd/template)
DEPENDS:=olsrd

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The +jshn dependency added by 4d027db is reverted here — the last commit, 4715213 ("olsrd: report the packaged version in the binary"), carries a second Makefile hunk that puts this line back to DEPENDS:=olsrd:

-  DEPENDS:=olsrd +jshn
+  DEPENDS:=olsrd

Nothing in that commit's subject or body mentions it, so it looks like a rebase/amend accident rather than a decision. The effect is that the bug 4d027db fixed is back at head: olsrd-neigh.sh:3 is still the only file olsrd-utils ships and it still sources /usr/share/libubox/jshn.sh, which olsrdlibubuslibubox does not pull in.

Suggested change
DEPENDS:=olsrd
DEPENDS:=olsrd +jshn

Generated by Claude Code

olsrd builds its version banner from the VERS make variable, which
defaults to the upstream development version "pre-0.9.9", so
`olsrd -v` never mentioned the version the package was built from.
The source tarball carries no git metadata either, so the git hash
in that string is always zero:

    olsr.org - pre-0.9.9-git_0000000-hash_5fd8976...

Pass PKG_VERSION as VERS, the same way alfred and batctl already
pass REVISION, so the banner identifies the packaged revision. This
also lets test-version.sh check the real version instead of merely
confirming that the binary starts.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.

4715213 was amended into e7f24a2, and the only change between the two is the olsrd-utils line going back to DEPENDS:=olsrd +jshn — so the accidental revert of 4d027db is gone and that commit is no longer empty at head. The commit message of e7f24a2 now matches its diff exactly (the VERS flag plus the test-version.sh change), so the commit-check note from my last review is resolved.

test-version.sh greps for $PKG_VERSION unquoted-by--F, which at this SHA expands to 2024.06.09~d72be9ad per download.mk:13; VERS reaches the sub-makes as a command-line variable, and the plugins version their .so files from their own PLUGIN_VER, so the olsrd_*.so.* install globs are unaffected. Still no grep -q.

The open items from the earlier reviews — olsrd_secure_key, the unconditional +iptables, the atof() on ubus input, and the unprototyped olsrd_add_ubus() declaration — are untouched by this push and still stand as maintainer calls. FormalityCheck is green at this SHA; the per-target build jobs are queued.


Generated by Claude Code

olsrd leaves through olsr_exit(), which ends the process with
raise(SIGTERM) rather than returning from main, so the shell reports
"Terminated" right after the version banner even for a plain
`olsrd -v`. The pipeline status comes from grep, so the check itself
is unaffected, but the line in the CI log looks like a failure to
anyone reading it.

Note it in the script so the next reader does not go hunting.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
BKPepe added a commit to BKPepe/openwrt-routing that referenced this pull request Aug 11, 2026
The package has been moved to the openwrt/packages feed, as
discussed in openwrt#184.

See openwrt/packages#30170.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit (605206e, olsrd: record why the version check logs "Terminated").

The commit is comment-only — four tab-indented lines above the olsrd -v pipeline in test-version.sh, matching the file's existing indentation and the case arms below it. Subject and body describe exactly that, the check itself is unchanged, and it still avoids grep -q. Nothing to flag in it.

All 14 checks are green at this SHA, including the ten per-target build jobs; Test x86_64 reports All tests passed with the olsrd-utils version-check override passing.

Reading that job's log did turn up one thing on the moved code, inline on olsrd.sh:627: the WireGuard detection calls ip -details, which BusyBox ip does not implement, so it dumps the applet usage into the log and the interface is skipped.

The earlier open items — olsrd_secure_key shipped as a conffile with a publicly known value, the unconditional +iptables for fw3-era chains, and the atof() on ubus input — are untouched by this push and still stand as maintainer calls.


Generated by Claude Code

Comment thread net/olsrd/files/olsrd.sh
ifnames="$ifnames \"$IFNAME\""
ifsglobal="$ifsglobal $IFNAME"
fi
elif [[ "$(ip -details link show dev $interface)" == *"wireguard"* ]]; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BusyBox ip has no -details option, so this branch never matches on a stock image and the applet prints its usage to stderr instead. The runtime test at this SHA shows it — from Test x86_64, during olsrd post-install:

* BusyBox v1.37.0 (2026-01-02 17:07:02 UTC) multi-call binary.
* Usage: ip [OPTIONS] address|route|link|neigh|rule [ARGS]
* OPTIONS := -f[amily] inet|inet6|link | -o[neline]
* olsrd: /etc/init.d/olsrd: olsrd_write_interface() Warning: Interface 'wlan' not found, skipped

The -details output only exists in iproute2's ip-full, which is not in DEPENDS at Makefile:37, so a WireGuard interface listed in config Interface falls through to the "not found, skipped" branch and is left out of the generated config. Reading the netdev kind from sysfs (/sys/class/net/$interface/uevent) would work with either ip applet; at minimum the call wants its stderr redirected so the usage dump stops appearing in the log for every non-WireGuard interface.

Inherited from the routing feed rather than introduced here, so this is a maintainer call on whether it belongs in the move commit or a follow-up — flagging it because the CI log at this head makes it concrete.


Generated by Claude Code

@thuehn

thuehn commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@BKPepe ... you have removed certain essential routing packages from routing feed without having them upstream in packages ... so right now, there are none of those routing packages selectable ... that sounds not correct to me. the workaround is to manually merge your pullrequest in packages to my trunk env in order to get olsrd back working ... but please help to fix this for others by once a routing package is added to the package feed, than remove it from routing feed and add a big HINT to all for the current state of none of the routing packages are in trunk but as PR waiting

@BKPepe

BKPepe commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

@thuehn Already replied here: openwrt/routing@925146d#commitcomment-196146204

​It's a snapshot, so things can break. Looking at the automated review here, there are a few things that need to be addressed before merging. Ask the maintainer, not me. Otherwise, we'd be stuck here forever, and we need to move forward. Anyone using this package can review it instead of pointing fingers.

@jonasjelonek

jonasjelonek commented Aug 13, 2026

Copy link
Copy Markdown
Member

Ok, here's my review so far: Please move those commits fixing issues to a separate PR for review by people who are able to review it properly, and leave this PR just with the "olsrd: add new package". Then I guess you can merge asap if it just a 1:1 copy.

EDIT: Snapshot doesn't mean "this will be broken on purpose with a commit", rather "it can be broken due to lack of testing".

@BKPepe

BKPepe commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

You can't seriously expect me to just merge this "#yolo style", right? :)

I am definitely not taking personal responsibility for merging it as-is, especially considering the remote command injection vulnerability and missing dependencies pointed out here: #30170 (review), that's such a bad approach.

Regarding the year-old issue openwrt/routing#184 (comment) and the complaints about the delay: it is finally getting the attention it deserves. I know that someone e.g like you might not like how it is, but it is what it is.

As you can read in that thread, there were previous attempts to add the packages, but we keep hitting the same wall – we lack the manpower, we lack active maintainers, and essentially, nobody is taking care of it. I understand your perspective and respect it. However, anyone who urgently needs this package can simply compile it from source until we manage to get it into a proper state.

And realistically, if we don't merge it now, this pull request is just going to hang here for a while anyway. Just look at the sheer number of open pull requests compared to the few active people we have.

While I appreciate everyone writing long essays here about how things should be solved, how about we get proactive? It would be much more productive if you guys reached out directly to the maintainers and pushed them to get their act together. :-)


It is just two days. Not a big deal.

@DamisDorgon

DamisDorgon commented Aug 13, 2026

Copy link
Copy Markdown

If Linus Torvalds was here, he would be screaming about "Do not break userspace". If you don't want to merge something here, the sane alternative is to not remove it from routing feed until it DOES merge here.

@PolynomialDivision

Copy link
Copy Markdown
Member

Keep this PR now as it is. The secure key, SmartGateway/iptables, WireGuard detection and ubus input validation can be handled as follow-ups.

@PolynomialDivision
PolynomialDivision merged commit 61972da into openwrt:master Aug 13, 2026
14 checks passed
@BKPepe

BKPepe commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

If Linus Torvalds was here, he would be screaming about "Do not break userspace". If you don't want to merge something here, the sane alternative is to not remove it from routing feed until it DOES merge here.

Oh, sorry for being rude here, but I like this for newly created account. You should take a look what snapshot, well, master builds and in the OpenWrt documentation, what it means IMHO. And if Linus Torvalds would join the party here, I would really appreciate to be known and recognized by him. :-))

It seems this has turned into a complete shitshow over the removal of just one single package ('cg' from the community feed). I stand by my decision and I know why I did it. You could compile your package yourself, it is not critical or crucial having this on the router.

As I’ve already mentioned, everyone had the opportunity to contribute and help out. That didn't happen. Instead, we're arguing here like kids in a sandbox. It's incredibly frustrating to think about how much time I've spent on this thread instead of doing actual productive work.

I think I already explained all the reasoning and I don't want to repeat myself e.g. saying IF WE WOULD WAIT UNTIL EVERYTHING IS NICE AND POLISHED, WE WOULD NOT GET ANYWHERE.

And also... having this discussion on multiple places just great.

The secure key, SmartGateway/iptables, WireGuard detection and ubus input validation can be handled as follow-ups.

@PolynomialDivision: I certainly don't want them to forget about it, create an issue about it and that you look at it and I won't get it like with bird openwrt/routing#1173 since March we keep coming back to it.

@jonasjelonek

Copy link
Copy Markdown
Member

You can't seriously expect me to just merge this "#yolo style", right? :)

Yet you did the yolo style package removal in the routing feed.

@thuehn

thuehn commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@BKPepe ... issue on my side fixed @upstream ... so you did triggered attention and multiple people got involved and sholrtly fixed olsrd in my case on trunk ... we are on trunk since years to have mesh wifi & early stuff available and shurely helping out as trunk is to be fixed all time as team effort ...

no hard feeling from my side ... just that I do think your way of moving olsrd routing package from one feed to another is a commit where no maintainer needs to be included (call it yolo style - what was a problem before stays .. what did worked stays as well - untouched) .. and all olsrd code changes can be handeld as PR as usual in the new feed repo ...

I am happy having just build trunk for our Freifunka Mesh network on those 5 out of 110 openwrt mesh routers for the x86 target and all routes are back for proper meshing ;)

Greetz Bluse

@DamisDorgon

Copy link
Copy Markdown

If Linus Torvalds was here, he would be screaming about "Do not break userspace". If you don't want to merge something here, the sane alternative is to not remove it from routing feed until it DOES merge here.

Oh, sorry for being rude here, but I like this for newly created account. You should take a look what snapshot, well, master builds and in the OpenWrt documentation, what it means IMHO. And if Linus Torvalds would join the party here, I would really appreciate to be known and recognized by him. :-))

I've been contributing to OpenWrt since 2006-ish. Not sure it's relevant, but I do know Linus, although barely.

It seems this has turned into a complete shitshow over the removal of just one single package ('cg' from the community feed). I stand by my decision and I know why I did it. You could compile your package yourself, it is not critical or crucial having this on the router.

I ended up just checking out the pre-removal routing feed. I am also a batman-adv user so the deletion of batctl and alfred also popped up on my radar. I do compile the packages myself. However, your deletion-before-merge was unnecessarily disruptive to other people also using OpenWrt. You are hearing about it because of that and because you seem to think that doing so was fine and no problem. Please be more considerate next time, it is not just your personal playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants