From 5aae4b93846d9761170c10f25b16515a5d843c9d Mon Sep 17 00:00:00 2001 From: Olof Hagsand Date: Fri, 29 Apr 2016 13:58:07 +0200 Subject: [PATCH] missing get-config xpath select attribute --- apps/netconf/netconf_rpc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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",