[Xorp-hackers] [PATCH 4/4] xorp: rtrmgr: Enable i32 and u64 multi value nodes to boot up
Ben Greear
greearb at candelatech.com
Tue Mar 13 10:12:45 PDT 2012
On 03/13/2012 03:49 AM, igorm at etf.rs wrote:
> From: Igor Maravic<igorm at etf.rs>
>
> Positive int and u64 values are read as uint. If our node is of type
> NODE_ULONG or NODE_INT and read type is of type NODE_UINT, than we have a match.
>
> Signed-off-by: Igor Maravic<igorm at etf.rs>
> ---
> xorp/rtrmgr/template_tree.cc | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/xorp/rtrmgr/template_tree.cc b/xorp/rtrmgr/template_tree.cc
> index 6b51a3a..fa04132 100644
> --- a/xorp/rtrmgr/template_tree.cc
> +++ b/xorp/rtrmgr/template_tree.cc
> @@ -491,6 +491,12 @@ TemplateTree::find_node_by_type(const list<ConfPathSegment>& path_segments)
> if (t->type() == type) {
> matches.push_back(t);
> continue;
> + } else if ((t->type() == NODE_ULONG || t->type() == NODE_INT)&& type == NODE_UINT) {
> + // u64 values are read as u32 values, because their
> + // regexp is the same.
> + // Same is for the positive int values.
> + matches.push_back(t);
> + continue;
> }
Fix code indentation of the comments please.
Thanks,
Ben
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Xorp-hackers
mailing list