[Xorp-cvs] XORP cvs commit: xorp/policy
Pavlin Radoslavov
pavlin at icir.org
Thu May 11 19:21:39 PDT 2006
CVSROOT: /usr/local/share/doc/apache/cvs
Module name: xorp
Changes by: pavlin at xorpc.icir.org 2006-05-12 02:21:39 UTC
XORP CVS repository
Modified files:
policy configuration.cc policy_statement.cc
policy_statement.hh term.cc term.hh
Log message:
* When the done_global_policy_conf XRL is received, call the
appropriate methods to mark the end of each policy, the end of
each term in a policy, and the end of each block in a term.
This allows us to perform some tiding when (re)configuring
the policies.
* Print a warning at the end of each policy if there are out-of-order
terms that won't be used.
* If there are out-of-order nodes in a term block, then use best
effort to add all nodes at the end of the term:
If no more out-of-order nodes can be added in-order, add the first
out-of-order node to the end of the set of in-order nodes.
Repeat recursively until there are no more out-of-order nodes left.
This fixes a potential issue if the policy template file is
written such that it contains a leaf node that has no corresponding
%create or %set XRL.
Such node may create a hole in the sequence of nodes received by
the policy manager hence we need the above heuristic.
Note that the above heuristic may result in some node misordering
if we perform 2+ configuration changes. E.g., if node (H) is a
leaf node without an XRL, and we try to commit the following
two configurations one after the other:
"A B C (H) E F G"
"A B C (H) D E F G"
Then the result will be:
"A B C E F G D"
(the correct one should be "A B C D E F G").
Strictly speaking we need node ordering only for rtrmgr multi-value
nodes (such as policy terms), and we don't really relay on the
node ordering inside the policy terms, hence the above mis-ordering
should be harmless.
Revision Changes Path
1.12 +4 -1; commitid: 22784463ec987ea6; xorp/policy/configuration.cc
1.9 +32 -1; commitid: 22784463ec987ea6; xorp/policy/policy_statement.cc
1.8 +6 -1; commitid: 22784463ec987ea6; xorp/policy/policy_statement.hh
1.19 +86 -1; commitid: 22784463ec987ea6; xorp/policy/term.cc
1.12 +14 -1; commitid: 22784463ec987ea6; xorp/policy/term.hh
More information about the Xorp-cvs
mailing list