ip rule processing partly broken (21.02 and Master)

M Rubon rubonmtz at gmail.com
Mon Jun 14 06:55:13 PDT 2021

ip rule command line parsing is partly broken in MASTER and 21.02
(using only default packages).  The command below works fine in 19.07
and big Debian.   If you remove the word "not", the command parses
fine in 21.02

root at 2102rc2#  ip rule add not from all fwmark 0x888 lookup 239
ip: invalid argument 'not' to 'ip'

My original bug tracker for this was about uci.
https://bugs.openwrt.org/index.php?do=details&task_id=3876   But it
appears there is a problem with BOTH the scripts which process the uci
and with the "ip rule" command itself.  When you specify "invert" in
the uci, you do get an almost-right rule, but it looks like the
"invert" was simply ignored.  If the uci scripts had generated the
correct "ip rule" command, the command would have failed and no
"almost right" rule would be visible.

Thanks!  Happy to help in further triage.


More information about the openwrt-devel mailing list