[Xorp-hackers] [PATCH 4/4] xorp: rtrmgr: Enable i32 and u64 multi value nodes to boot up
igorm at etf.rs
igorm at etf.rs
Tue Mar 13 03:49:15 PDT 2012
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;
}
//
// XXX: the type check failed.
--
1.7.5.4
More information about the Xorp-hackers
mailing list