NETCONF-539: use netconf namespace in base:1.1 capability check
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / AbstractNetconfSessionNegotiator.java
index 30b81146040c8818bc8bf567a18007f642c48f1a..4135896b34d28361a4a9fd6f19d6e09864fccdcc 100644 (file)
@@ -248,7 +248,9 @@ public abstract class AbstractNetconfSessionNegotiator<P extends NetconfSessionP
     }
 
     private static boolean containsBase11Capability(final Document doc) {
-        final NodeList nList = doc.getElementsByTagName(XmlNetconfConstants.CAPABILITY);
+        final NodeList nList = doc.getElementsByTagNameNS(
+            XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0,
+            XmlNetconfConstants.CAPABILITY);
         for (int i = 0; i < nList.getLength(); i++) {
             if (nList.item(i).getTextContent().contains(XmlNetconfConstants.URN_IETF_PARAMS_NETCONF_BASE_1_1)) {
                 return true;