Fixed: [Yang identityref XML encoding is not general](https://github.com/clicon/clixon/issues/90)
* Revisiting this issue now seems to work, there are no regressions that fail when disabling IDENTITYREF_KLUDGE.
This commit is contained in:
parent
779fcf5458
commit
b0f898cf66
5 changed files with 6 additions and 6 deletions
|
|
@ -88,6 +88,8 @@ Developers may need to change their code
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
|
||||||
|
* Fixed: [Yang identityref XML encoding is not general](https://github.com/clicon/clixon/issues/90)
|
||||||
|
* Revisiting this issue now seems to work, there are no regressions that fail when disabling IDENTITYREF_KLUDGE.
|
||||||
* Fixed several xpath crashes discovered by unit xpath fuzzing
|
* Fixed several xpath crashes discovered by unit xpath fuzzing
|
||||||
* Fixed: SEGV when using NETCONF get filter xpath and non-existent key
|
* Fixed: SEGV when using NETCONF get filter xpath and non-existent key
|
||||||
* eg `select="/ex:table[ex:non-exist='a']`
|
* eg `select="/ex:table[ex:non-exist='a']`
|
||||||
|
|
|
||||||
|
|
@ -572,7 +572,7 @@ cli_start_shell(clicon_handle h,
|
||||||
char bcmd[128];
|
char bcmd[128];
|
||||||
cg_var *cv1 = cvec_i(vars, 1);
|
cg_var *cv1 = cvec_i(vars, 1);
|
||||||
sigset_t oldsigset;
|
sigset_t oldsigset;
|
||||||
struct sigaction oldsigaction[32] = {0,};
|
struct sigaction oldsigaction[32] = {{{0,},},};
|
||||||
|
|
||||||
if (cvec_len(argv) > 1){
|
if (cvec_len(argv) > 1){
|
||||||
clicon_err(OE_PLUGIN, EINVAL, "Received %d arguments. Expected: [<shell>]",
|
clicon_err(OE_PLUGIN, EINVAL, "Received %d arguments. Expected: [<shell>]",
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,10 @@
|
||||||
* needs to generate a netconf statement with correct xmlns binding.
|
* needs to generate a netconf statement with correct xmlns binding.
|
||||||
* The easy way to do this is to always generate all prefix/namespace bindings
|
* The easy way to do this is to always generate all prefix/namespace bindings
|
||||||
* on the top-level for the modules involved in the netconf operation.
|
* on the top-level for the modules involved in the netconf operation.
|
||||||
|
* Update 2022-11: seems most cornercases are covered and this is now disabled.
|
||||||
|
* I am sure there are remaining cases but undef this for now and close #90
|
||||||
*/
|
*/
|
||||||
#define IDENTITYREF_KLUDGE
|
#undef IDENTITYREF_KLUDGE
|
||||||
|
|
||||||
/*! Optimize special list key searches in XPATH finds
|
/*! Optimize special list key searches in XPATH finds
|
||||||
* Identify xpaths that search for exactly a list key, eg: "y[k='3']" and then call
|
* Identify xpaths that search for exactly a list key, eg: "y[k='3']" and then call
|
||||||
|
|
|
||||||
|
|
@ -275,9 +275,7 @@ validate_identityref(cxobj *xt,
|
||||||
if (prefix == NULL)
|
if (prefix == NULL)
|
||||||
ymod = ys_module(ys);
|
ymod = ys_module(ys);
|
||||||
else{ /* from prefix to name */
|
else{ /* from prefix to name */
|
||||||
#if 1 /* IDENTITYREF_KLUDGE */
|
|
||||||
ymod = yang_find_module_by_prefix_yspec(ys_spec(ys), prefix);
|
ymod = yang_find_module_by_prefix_yspec(ys_spec(ys), prefix);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (ymod == NULL){
|
if (ymod == NULL){
|
||||||
cprintf(cberr, "Identityref validation failed, %s not derived from %s in %s.yang:%d",
|
cprintf(cberr, "Identityref validation failed, %s not derived from %s in %s.yang:%d",
|
||||||
|
|
|
||||||
|
|
@ -267,9 +267,7 @@ derived_from_one(char *baseidentity,
|
||||||
if (prefix == NULL)
|
if (prefix == NULL)
|
||||||
ymod = ys_module(yleaf);
|
ymod = ys_module(yleaf);
|
||||||
else{ /* from prefix to name */
|
else{ /* from prefix to name */
|
||||||
#if 1 /* IDENTITYREF_KLUDGE */
|
|
||||||
ymod = yang_find_module_by_prefix_yspec(ys_spec(yleaf), prefix);
|
ymod = yang_find_module_by_prefix_yspec(ys_spec(yleaf), prefix);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (ymod == NULL)
|
if (ymod == NULL)
|
||||||
goto nomatch;
|
goto nomatch;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue