diff --git a/apps/netconf/netconf_rpc.c b/apps/netconf/netconf_rpc.c
index cb5dd206..14b97ec5 100644
--- a/apps/netconf/netconf_rpc.c
+++ b/apps/netconf/netconf_rpc.c
@@ -86,8 +86,8 @@
]]>]]>
* filter subnet + no config:
]]>]]>
- * filter xpath + no select:
- ]]>]]>
+ * filter xpath + select all:
+ ]]>]]>
* filter subnet + config:
]]>]]>
* filter xpath + select:
@@ -152,7 +152,15 @@ netconf_filter_xmldb(clicon_handle h,
clicon_xml2cbuf(cb, xc, 0, 1);
break;
case FILTER_XPATH:
- selector = xml_find_value(xfilter, "select");
+ if ((selector = xml_find_value(xfilter, "select")) == NULL){
+ netconf_create_rpc_error(cb_err, xorig,
+ "missing-attribute",
+ "protocol",
+ "error",
+ NULL,
+ "select");
+ goto done;
+ }
if (xmldb_get(h, source, selector, 0, &xdb, NULL, NULL) < 0){
netconf_create_rpc_error(cb_err, xorig,
"operation-failed",