Another method for preventing suboptimal routing on redistributing routers is to tag routes with a numeric identifier, indicating the source router that injected the route into the network.
Performing simple route filtering at any other redistributing router will prevent sub-optimal routing from occurring.
In this example RIP routes are redistributed into OSPF using a tag of 9999 on R1.
When R3 gets the routes, it sees the tags in the routing information. R3 is configured to match any route with this tag 9999 and filter it from being learned via OSPF, doing so prevents suboptimal routing.