mark-connection confusion

I am trying to figure this out for day and I can not find workable solution.

Here is sample setup:

Ether1 - WANlink 1, dhcp
Ether2 - WAN link 2, dhcp
Ether3 - LAN1, 192.168.100.0/24
Ether4 - LAN2, 192.168.50.0/24

What I want to achieve is that everything from LAN1 goes to WAN1 (this is my default connection), and that everything from LAN2 goes to WAN2 (and when data starts coming back that it is routed to the client who originated the connection). No load balancing, failovers or anything similar.

I have created appropriate NAT configuration and route. I believe that my troubles lie in mangle configuration.

If I do mangle mark-routing rule like this (and only this rule):

chain=prerouting action=mark-routing new-routing-mark=WAN2 passthrough=yes src-address=192.168.50.0/24

All of my LAN2 traffic will end up on WAN2 link (with appropriate route configured), now the trouble is that this works only partialy and some of my connections are breaking down.

I believe I need to do appropriate mark-connection on my WAN2/LAN2 link.

Does anyone have working setup for a configuration as described above (or similar)?

You need to add in routing a route for wan2 mark too. If wan2 is dynamic you will also need to script re route instead.