mwan3rtmon rewrite in ucode (Re: ucode for scripts)

Etienne Champetier champetier.etienne at gmail.com
Sat Nov 8 10:11:17 PST 2025


Hello Jonas,

Le mer. 5 nov. 2025 à 15:52, Jonas Lochmann <openwrt at jonaslochmann.de> a écrit :
>
> Am Tue, Nov 04, 2025 at 09:11:56PM +0100, schrieb Paul D:
> > This is in line with stated goals for 24.10, to use more ucode.
>
> Where are those documented?
>
> I am wondering whether ucode or native code are preferred? mwan3rtmon
> is a shell script right now but does a lot of netlink stuff by calling
> other tools. So I am thinking of rewriting it in another language and
> now I am unsure which one I should take.

I also had a look at rewriting mwan3rtmon in ucode recently and I'm
wondering if we could just get rid of it.
Basically this script watches the main routing table to copy all non
default routes, and also fill an ipset,
but I think using rules like 'lookup main suppress_prefixlength 0' we
should be able to remove mwan3rtmon.

Also found some example rtnl code in
https://github.com/jow-/ucode/issues/184 if you are looking for some

Best
Etienne

> > Also, not certain what the ucode equivalent is for "eval export --" kinda stuff (but IIRC, those only live for the duration of the shell, no?). Perhaps jow can answer.
>
> I assume that ucode can handle structured data and JSON without this constructions.



More information about the openwrt-devel mailing list