[Xorp-hackers] [PATCH 2/2] xorp: policy: Fix problem with route distribution

Ben Greear greearb at candelatech.com
Tue Apr 10 09:06:29 PDT 2012


On 04/10/2012 05:59 AM, igorm at etf.rs wrote:
> From: Igor Maravic<igorm at etf.rs>
>
> Problem was that protocol's existing EXPORT_SOURCE match policies weren't refreshed when new export filter is created.
>
> New protocol always has accurate policy tags for route lookup. It always searches routes that has no tag, or
> older protocol tags or it's tags. If it finds them it prepends it's tag.
> Older protocols are searching routes that has no tags, or have older tags. If it finds such a route it prepends it's tag.
>
> EXPORT_SOURCEMATCH policies are executed in order that depends on protocol name.
> If newer protocol has lower letter (for example ospf's policies are executed before rip's, because "o" precedes "r"),
> new protocol prepends new tags, that are unrecognizable to older protocol, to routes that it has found.
> Because older protocol is unaware of new tags, it concludes that routes are deleted and it deletes them.
> This is not what we are expecting.
>
> If older protocol is executed first, it prepends it's tag to routes that it has found. Because old tag is recognizable by
> newer protocol new tags are also prepended to routes. This case works as expected.
>
> Solution - refresh tags for all protocol's EXPORT_SOURCEMATCH routes when new export filter is created.

Thanks for working on this!

I've just applied and pushed the patches, so anyone who wants to test can
just pull down the latest and give it a try.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list