From: Igor Maravic <[email protected]>

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 <[email protected]>
---
 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

_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to