Skip to content

interface: add strong host mark routing#87

Draft
dhrm1k wants to merge 1 commit into
openwrt:masterfrom
dhrm1k:strong-host-mark-routing
Draft

interface: add strong host mark routing#87
dhrm1k wants to merge 1 commit into
openwrt:masterfrom
dhrm1k:strong-host-mark-routing

Conversation

@dhrm1k

@dhrm1k dhrm1k commented Jul 16, 2026

Copy link
Copy Markdown

Add an optional mark and mask to a network interface and install matching
policy-routing rules for its ip4table and ip6table.

For example:

config interface 'wan2'
	option ip4table '200'
	option ip6table '200'
	option stronghost_mark '0x02/0xff'

The mapping is also included in the interface status returned by netifd.

This is the routing half of the strong-host work discussed in
firewall4 issue #93. A
follow-up firewall4 change will use the mapping to remember the ingress WAN in
the conntrack mark and restore the packet mark on replies.

The option is disabled by default. Without the firewall4 change, existing
configurations are unaffected and the rule only has an effect when another
component sets the configured packet mark.

@dhrm1k
dhrm1k marked this pull request as draft July 16, 2026 02:57
Add an optional mark and mask to an interface and install matching rules for its IPv4 and IPv6 routing tables.

Include the mapping in interface status so firewall4 can route replies through the interface they arrived on.

Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
@dhrm1k
dhrm1k force-pushed the strong-host-mark-routing branch from e5f7590 to ed1ff48 Compare July 19, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant