summaryrefslogtreecommitdiff
path: root/src/cstore/cstore-varref.cpp
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2011-05-17 11:51:01 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2011-05-17 11:51:01 -0700
commit34cb5fb6b40c6c027d5efa63bcac059f37b8d0f7 (patch)
treea69784ed5b2ab9243ebdd767282f09516c18cd03 /src/cstore/cstore-varref.cpp
parent624426d06487d96b4e0d50586adf90af5b47af01 (diff)
downloadvyatta-cfg-34cb5fb6b40c6c027d5efa63bcac059f37b8d0f7.tar.gz
vyatta-cfg-34cb5fb6b40c6c027d5efa63bcac059f37b8d0f7.zip
add var ref "bug" to maintain backward compatibility.
Diffstat (limited to 'src/cstore/cstore-varref.cpp')
-rw-r--r--src/cstore/cstore-varref.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cstore/cstore-varref.cpp b/src/cstore/cstore-varref.cpp
index efe1b04..46dba23 100644
--- a/src/cstore/cstore-varref.cpp
+++ b/src/cstore/cstore-varref.cpp
@@ -109,7 +109,13 @@ Cstore::VarRef::process_ref(const Cpath& ref_comps,
return;
}
if (def->isTypeless()) {
- // no value for typeless node
+ /* no value for typeless node, so this should be invalid ref
+ * according to the spec.
+ * XXX however, the original implementation erroneously treats
+ * this as valid ref and returns the node "name" as the "value".
+ * for backward compatibility, keep the same behavior.
+ */
+ process_ref(rcomps, pcomps, ERROR_TYPE);
return;
}
if (pcomps.size() == _orig_path_comps.size()) {