Thanks for taking your time to reply.
Please note that I'm talking about BRIDGE dst-nat (not IP routing), where I ONLY want (actually HAVE) to redirect packets from bridge to internal, in order to force another route.
And yes, I read the packet flow, that's why I marked the post with "feature request"; it would need a change.
Let me explain again what I need:
a. RouterBoard in BRIDGE mode (but with DHCP on, etc) for some good reasons.
Physically placed between the dsl modem/router and the switch going to other devices.
Wlan also connected to bridge.
b. I want to re-route some traffic (e.g. geographical block, etc) from the default processing (bridge -> dsl router, etc) to a vpn connection.
In IP firewall mangle (activated from bridge settings) I can identify / mark the traffic as I want.
But after that (according to the flow diagram) the traffic goes directly to the bridge output, ignoring what I did in IP firewall (i.e. routing marks). Routing is simply ignored ... unless I use the BRIDGE dst-nat to redirect some selected traffic towards input.
The main problem is, in bridge dst-nat I have a lot less options and I have to redirect a lot more traffic to input / routing.
It would be much better to redirect to input only the traffic I want to re-route, leaving everything else to the bridge.
That means, I would like to influence bridge-decision based on pre-routing mangle.
Current flow, simplified, pseudo code
1 Bridge dst-nat
if "some simple conditions" then redirect to input
2 IP firewall / prerouting / mangle
if "some complex conditions" then set route mark "vpn"
3 Bridge decision
if target mac is self then goto routing
else bridge out
I have to duplicate rules in IP mangle and bridge nat for redirect. If the rules in 1) are "wider", traffic is unnecessarily going to input; if the rules are "narrower", traffic is marked but going to bridge output and my routing is ignored. Ideally the conditions are (almost) identical, but it means at least double work (for me and for the router).
What I would like is to re-order 1 and 2:
1 IP firewall / prerouting / mangle; same as 2) above
2 Bridge dst-nat; much simplified
if route mark = "vpn" then redirect to input
3 Same as before
Would it break anything??
I can also think of a special NEW option for the bridge decision:
If routing mark NOT empty, redirect to input!
1 IP firewall / prerouting / mangle
2 Bridge decision
if mac = self OR route mark <> empty then goto input
Does this make more sense?
Thanks for your attention,
Gabriel