Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3876 - uci network rule: The invert option is ignored when creating a routing rule #8884

Closed
openwrt-bot opened this issue Jun 13, 2021 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

openwrt-bot commented Jun 13, 2021

wiltedwalls:

The invert tag is ignored when creating uci network rule in 21.02.0-rc2.

uci set network.unmarkedThroughTable=rule
uci set network.unmarkedThroughTable.mark="0x888"
uci set network.unmarkedThroughTable.invert='1'
uci set network.unmarkedThroughTable.lookup='200'

After this definition, ip rule list from the command line shows
1: from all fwmark 0x888 lookup 200 (21.02.0-rc2)
instead of the correct
1: not from all fwmark 0x888 lookup 200 (19.07.7)

This worked fine in 19.07

https://openwrt.org/docs/guide-user/network/ip_rules#options_for_ip_rule_rule_and_rule6_sections

@openwrt-bot
Copy link
Author

openwrt-bot commented Jun 13, 2021

wiltedwalls:

Problem also visible using OpenWrt SNAPSHOT and OpenWrt 21.02-SNAPSHOT.

The router is a GL-MT300N-V2, which is based on a MediaTek MT7628AN.

The problem also happens on a TP Link c7 v2, which is ath79, so the problem is not architecture specific.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jun 13, 2021

wiltedwalls:

It looks like it is a problem with the busybox ip rule command itself in 21.02-rc2

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

This works on 19.07, as well as Debian buster.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jun 15, 2021

wiltedwalls:

Jo-Philipp Wich pointed out that the "ip rule" built into busybox does not accept/display the "not" switch. When I install ip-tiny and display using that, I can see the
"not" is happening at the right place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant