Skip to content

[openwrt-25.12] luci-app-olsr: fix blank olsr pages - #8934

Open
gratux wants to merge 6 commits into
openwrt:openwrt-25.12from
gratux:fix_olsr_undefined_functions_25.12_backport
Open

[openwrt-25.12] luci-app-olsr: fix blank olsr pages#8934
gratux wants to merge 6 commits into
openwrt:openwrt-25.12from
gratux:fix_olsr_undefined_functions_25.12_backport

Conversation

@gratux

@gratux gratux commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Backport of #8715. Original Description:

Pull request details

Description

On OpenWrt 25.12.4 some OLSR Status pages (Neighbours, Routes, Topology), as well as the settings page when adding a new interface, are completely blank.
This PR introduces three fixes to restore functionality:

  • correctly reference etx_color and snr_colors from olsr/common_js (these functions were previously moved, but their call sites had not been updated to match)
    additionally, some code still referenced common/common_js. this is now updated to olsr/common_js.
  • avoid a shell "too long argument list" error when processing huge olsr-jsoninfo data with jshn.sh (in my case the Topology status page tried to process ~370KB of JSON data). The workaround is to not use jshn.sh and instead escape the string manually.
  • When adding a new interface on the settings page it resulted in a blank page with no obvious error. c567bfc removed the call to actually create the config section for the interface. This has now been re-added.

Screenshot or video of changes (if applicable)

Page before after
OLSR/Neighbours before after
Services/OLSR IPv(4|6) -> Interfaces -> Add before2 after2

Maintainer (preferred)

unsure who I should ping here.
last person to touch the Makefile was @systemcrash.


Tested on

OpenWrt version: OpenWrt 25.12.4 (r32933-4ccb782af7)
LuCI version: LuCI openwrt-25.12 branch (26.167.08537~9ccd99b)
Web browser(s): LibreWolf 152.0-1


Checklist

  • This PR is not from my main or master branch 💩, but a separate branch. ✅
  • Each commit has a valid ✒️ Signed-off-by: <my@email.address> row (via git commit --signoff).
  • Each commit and PR title has a valid 📝 <package name>: title first line subject for packages.
  • Incremented 🆙 any PKG_VERSION in the Makefile.
  • (Optional) Includes what Issue it closes (e.g. openwrt/luci#issue-number).
  • (Optional) Includes what it depends on (e.g. openwrt/packages#pr-number in sister repo).

@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.

Commit checks

All five commits carry a (cherry picked from commit <sha>) trailer, but every one of them names the SHA from the author's fix_olsr_undefined_functions fork branch (i.e. the head commits of #8715), not the commit that actually landed on master. #8715 was rebase-merged, so those SHAs are not reachable from openwrt/luci master and the trailers can't be resolved by anyone tracking the branch:

  • 68970ff "luci-app-olsr: fix undefined functions" — trailer says 6b7202549e...; on master this is de86147131
  • 16ee46c "luci-app-olsr: support large jsoninfo responses" — trailer says f3ba37d7c6...; on master this is fa03475827
  • a677451 "luci-app-olsr: update common_js location" — trailer says 2dc9688807...; on master this is 675832714f
  • e5954f0 "luci-app-olsr: handle multi-line jsoninfo response" — trailer says fc54e37232...; on master this is 4cbdef7f22
  • bccfd51 "luci-app-olsr: re-add missing interface creation" — trailer says 10b08daa2a...; on master this is d98f03e201

Re-doing the series with git cherry-pick -x de86147131 fa03475827 675832714f 4cbdef7f22 d98f03e201 from origin/master would produce the right trailers.

The diffs themselves match their master counterparts exactly (the only textual difference is one unchanged context line in neighbors.js, link.linkCost === 4194304 on this branch vs == on master, which is pre-existing branch divergence and not introduced here). One missing prerequisite is flagged inline.


Generated by Claude Code

@gratux
gratux force-pushed the fix_olsr_undefined_functions_25.12_backport branch from bccfd51 to 82ddd25 Compare August 12, 2026 14:47
@openwrt openwrt Bot added the not following guidelines Pull request does not follow formatting guidelines label Aug 12, 2026

@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 6 new commits; no new issues found.

Both items from the previous review are addressed:

  • The missing prerequisite is now in the series as 2bd9d7b "luci-app-olsr: correctness fixes", so olsr.etx_color / olsr.snr_colors are exported before the call sites start using them.
  • Every (cherry picked from commit <sha>) trailer now names a commit that is reachable from openwrt/luci master (0b93761a38, de86147131, fa03475827, 675832714f, 4cbdef7f22, d98f03e201).

Each of the six commits' diffs is byte-identical to its upstream counterpart, and after the series the luci-app-olsr code tree on this branch matches master at d98f03e201 exactly (only po/* translation files differ, as expected for a backport). There are no non-translation luci-app-olsr commits on master after d98f03e201, so nothing further is pending for this backport.

The one red check (FormalityCheck / Git & Commits, empty body on 2bd9d7b) is inherited verbatim from the upstream commit message; the formality bot already reports it, so I'm not duplicating it here.


Generated by Claude Code

@gratux
gratux force-pushed the fix_olsr_undefined_functions_25.12_backport branch from 82ddd25 to 2891551 Compare August 12, 2026 17:27
@openwrt openwrt Bot removed the not following guidelines Pull request does not follow formatting guidelines label Aug 12, 2026

@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.

Commit checks

  • 7dd7306 "luci-app-olsr: correctness fixes" — the message body was added after the (cherry picked from commit ...) trailer, which splits the trailer block and drops the original author's sign-off out of it. git interpret-trailers --parse on this message returns only Signed-off-by: Victoria Grain <victoria+openwrt@gratux.xyz>; Paul Donald's Signed-off-by: is now parsed as ordinary body text, and the cherry-pick trailer is no longer the last line. Also, the new sign-off is glued directly to the description line with no blank line between them. Conventional form would be:

    luci-app-olsr: correctness fixes
    
    improve comparison to handle equal values
    
    Signed-off-by: Paul Donald <newtwen+github@gmail.com>
    Signed-off-by: Victoria Grain <victoria+openwrt@gratux.xyz>
    (cherry picked from commit 0b93761a38825f7d8f9bc2bffb7dc828e8ccb819)
    

    Minor: the added line describes only the a.proto < b.proto ? -1 : ... comparator changes; the same commit also exports etx_color/snr_colors from olsr/common_js (the prerequisite for the rest of this series) and relaxes link.linkCost === 4194304 to ==. Worth a word on those too while amending.

No code changed since the last review — git diff 82ddd25..2891551 is empty, and each of the six commits is still patch-identical to its upstream counterpart (0b93761a38, de86147131, fa03475827, 675832714f, 4cbdef7f22, d98f03e201), all reachable from openwrt/luci master. master still has no non-translation luci-app-olsr commits after d98f03e201, so the series remains complete. All four checks on 2891551 are green, including the FormalityCheck / Git & Commits run that the previous head failed.


Generated by Claude Code

systemcrash and others added 6 commits August 14, 2026 11:11
improve cost comparison;
export common *_color functions

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 0b93761)
Signed-off-by: Victoria Grain <victoria+openwrt@gratux.xyz>
the functions `etx_color` and `snr_colors` were previously moved to common_js,
but their callsites were not updated to match.

Signed-off-by: Victoria Grain <victoria+openwrt@gratux.xyz>
(cherry picked from commit de86147)
due to ash's argument list limit, large jsons blow up the rpc call.
as a workaround, the jsoninfo is escaped manually.

Signed-off-by: Victoria Grain <victoria+openwrt@gratux.xyz>
(cherry picked from commit fa03475)
common_js was previously moved from common/ to olsr/
but not all references had been updated to match.

Signed-off-by: Victoria Grain <victoria+openwrt@gratux.xyz>
(cherry picked from commit 6758327)
olsrd seems to always respond with a single line json
but this is more robust.

Signed-off-by: Victoria Grain <victoria+openwrt@gratux.xyz>
(cherry picked from commit 4cbdef7)
commit c567bfc removed the uci.add() call to create a new interface,
seemingly without considering its side-effects. this lead to trying to
configure a non-existant interface, resulting in an empty settings page.

Signed-off-by: Victoria Grain <victoria+openwrt@gratux.xyz>
(cherry picked from commit d98f03e)
@gratux
gratux force-pushed the fix_olsr_undefined_functions_25.12_backport branch from 2891551 to 24c72d8 Compare August 14, 2026 09:24

@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 6 new commits; no new issues found.

The only change since the last review is the commit message of 8376c48 "luci-app-olsr: correctness fixes" (git diff 2891551..24c72d8 is empty), and it resolves the previous comment:

  • Body is now placed before the trailer block, so git interpret-trailers --parse returns both Signed-off-by: Paul Donald and Signed-off-by: Victoria Grain, with the (cherry picked from commit 0b93761a38...) line between them — the standard git cherry-pick -x -s layout.
  • The body now covers both halves of the diff (the a.proto < b.proto ? -1 : ... comparators and the etx_color/snr_colors export from olsr/common_js).

Re-verified the backport itself: all six commits are still patch-identical (git patch-id --stable) to their upstream counterparts 0b93761a38, de86147131, fa03475827, 675832714f, 4cbdef7f22, d98f03e201, and all six are reachable from openwrt/luci master. After the series, the non-po/ applications/luci-app-olsr/ tree on this branch is identical to master, and the only luci-app-olsr commits on master after d98f03e201 are Weblate translation syncs — so nothing further is pending for this backport.

All four checks on 24c72d8 are green.


Generated by Claude Code

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.

3 participants