{"action":"opened","issue":{"url":"https://api.github.com/repos/CESNET/libnetconf/issues/84","labels_url":"https://api.github.com/repos/CESNET/libnetconf/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/CESNET/libnetconf/issues/84/comments","events_url":"https://api.github.com/repos/CESNET/libnetconf/issues/84/events","html_url":"https://github.com/CESNET/libnetconf/issues/84","id":96311645,"number":84,"title":"Reply data of get-config with subtree filter is wrong","user":{"login":"classcwnd","id":3356405,"avatar_url":"https://avatars.githubusercontent.com/u/3356405?v=3","gravatar_id":"","url":"https://api.github.com/users/classcwnd","html_url":"https://github.com/classcwnd","followers_url":"https://api.github.com/users/classcwnd/followers","following_url":"https://api.github.com/users/classcwnd/following{/other_user}","gists_url":"https://api.github.com/users/classcwnd/gists{/gist_id}","starred_url":"https://api.github.com/users/classcwnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/classcwnd/subscriptions","organizations_url":"https://api.github.com/users/classcwnd/orgs","repos_url":"https://api.github.com/users/classcwnd/repos","events_url":"https://api.github.com/users/classcwnd/events{/privacy}","received_events_url":"https://api.github.com/users/classcwnd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-21T13:12:32Z","updated_at":"2015-07-21T13:12:32Z","closed_at":null,"body":"When we configured some data to the server and get-config with subtree filter, but got unexpected rpc-reply.\r\nBelow is our configure. The list <static-route> have 3 keys(ip-prefix, next-hop-type and next-ho).\r\nAnd the subtree filter includes 2 keys with value.  \r\nTo my understanding, if the filter<estatic-route:next-hop-type>next-hop-interface</estatic-route:next-hop-type> can’t be matched(we configured next-hop-address, not next-hop-interface), the rpc-reply won’t contain any data. \r\nBut currently, server replied the data(which is unexpected), moreover, the unexpected data didn’t contains a request label.\r\n \r\nConfigure:\r\n```\r\n          <?xml version='1.0' encoding='UTF-8'?>\r\n          <rpc message-id=\"3\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\r\n            <edit-config>\r\n              <target>\r\n                <running/>\r\n              </target>\r\n              <config>\r\nContainer:      <econfig:contexts xmlns:econfig=\"urn:ietf:params:xml:ns:yang:my-config\">\r\nList:             <econtext:context xmlns:econtext=\"urn:ietf:params:xml:ns:yang:my-context\">\r\nLeaf key:          <econtext:context-name>local</econtext:context-name>\r\nContainer:          <econtext:ip>\r\nList:                 <estatic-route:static-route xmlns:estatic-route=\"urn:ietf:params:xml:ns:yang:my-static-route\">\r\nLeaf key:               <estatic-route:ip-prefix>1.1.1.0/24</estatic-route:ip-prefix>\r\nLeaf key:               <estatic-route:next-hop-type>next-hop-address</estatic-route:next-hop-type>\r\nLeaf key:               <estatic-route:next-hop>2.2.2.2</estatic-route:next-hop>\r\n                      </estatic-route:static-route>\r\n                    </econtext:ip>\r\n                  </econtext:context>\r\n                </econfig:contexts>\r\n              </config>\r\n            </edit-config>\r\n          </rpc>\r\n]]>]]>\r\n```\r\n\r\nget-config Message:\r\n```\r\n<?xml version='1.0' encoding='UTF-8'?>\r\n<rpc message-id=\"1\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\r\n  <get-config>\r\n    <source>\r\n      <running/>\r\n    </source>\r\n    <filter type=\"subtree\">\r\n      <econfig:contexts xmlns:econfig=\"urn:ietf:params:xml:ns:yang:my-config\">\r\n        <econtext:context xmlns:econtext=\"urn:ietf:params:xml:ns:yang:my-context\">\r\n          <econtext:context-name>a</econtext:context-name>\r\n          <econtext:ip>\r\n            <estatic-route:static-route xmlns:estatic-route=\"urn:ietf:params:xml:ns:yang:my-static-route\">\r\n              <estatic-route:ip-prefix>1.1.1.0/24</estatic-route:ip-prefix>\r\n              <estatic-route:next-hop-type>next-hop-interface</estatic-route:next-hop-type>\r\n              <estatic-route:next-hop/>\r\n            </estatic-route:static-route>\r\n          </econtext:ip>\r\n        </econtext:context>\r\n      </econfig:contexts>\r\n    </filter>\r\n  </get-config>\r\n</rpc>\r\n```\r\n\r\nRPC reply:\r\n```\r\n<?xml version='1.0' encoding='UTF-8'?>\r\n<rpc-reply xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\" message-id=\"1\">\r\n  <data>\r\n    <econfig:contexts xmlns:econfig=\"urn:ietf:params:xml:ns:yang:my-config\" xmlns:econtext=\"urn:ietf:params:xml:ns:yang:my-context\" xmlns:estatic-route=\"urn:ietf:params:xml:ns:yang:my-static-route\" xmlns:eospf=\"urn:ietf:params:xml:ns:yang:my-ospf\">\r\n      <econtext:context>\r\n        <econtext:context-name>a</econtext:context-name>\r\n        <econtext:ip>\r\n          <estatic-route:static-route>\r\n            <estatic-route:ip-prefix>1.1.1.0/24</estatic-route:ip-prefix>\r\n            <estatic-route:next-hop>2.2.2.2</estatic-route:next-hop>\r\n          </estatic-route:static-route>\r\n        </econtext:ip>\r\n      </econtext:context>\r\n    </econfig:contexts>\r\n  </data>\r\n</rpc-reply>\r\n```"}}