[Xorp-hackers] [greearb/xorp.ct] 990a47: trivial: ws fixes

GitHub noreply at github.com
Tue Apr 10 09:05:59 PDT 2012


  Branch: refs/heads/master
  Home:   https://github.com/greearb/xorp.ct
  Commit: 990a47939c0f41acd7f39a263169ce4b87889a88
      https://github.com/greearb/xorp.ct/commit/990a47939c0f41acd7f39a263169ce4b87889a88
  Author: Igor Maravic <igorm at etf.rs>
  Date:   2012-04-10 (Tue, 10 Apr 2012)

  Changed paths:
    M xorp/policy/backend/policy_redist_map.cc
  M xorp/policy/backend/single_varrw.cc
  M xorp/policy/code.cc
  M xorp/policy/code.hh
  M xorp/policy/code_list.cc
  M xorp/policy/code_list.hh
  M xorp/policy/configuration.cc
  M xorp/policy/filter_manager.cc
  M xorp/policy/policy_list.cc
  M xorp/policy/source_match_code_generator.cc
  M xorp/rib/rt_tab_pol_conn.cc
  M xorp/rib/rt_tab_pol_redist.cc
  M xorp/rib/xrl_target.cc

  Log Message:
  -----------
  trivial: ws fixes

Signed-off-by: Igor Maravic <igorm at etf.rs>


  Commit: a67f53be240ae7f7438fd48e3be3d7ffe74be969
      https://github.com/greearb/xorp.ct/commit/a67f53be240ae7f7438fd48e3be3d7ffe74be969
  Author: Igor Maravic <igorm at etf.rs>
  Date:   2012-04-10 (Tue, 10 Apr 2012)

  Changed paths:
    M xorp/policy/code.cc
  M xorp/policy/code.hh
  M xorp/policy/code_list.cc
  M xorp/policy/code_list.hh
  M xorp/policy/configuration.cc
  M xorp/policy/policy_list.cc
  M xorp/policy/source_match_code_generator.cc

  Log Message:
  -----------
  xorp: policy: Fix problem with route distribution

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.

Reported-by: Steve Dickey <swdickey at rockwellcollins.com>
Signed-off-by: Igor Maravic <igorm at etf.rs>


Compare: https://github.com/greearb/xorp.ct/compare/8ad7d8f...a67f53b


More information about the Xorp-hackers mailing list