fixed incorrect interface list report on Windows before NT 6.0
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 29 Aug 2016 09:05:52 +0000 (12:05 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 29 Aug 2016 09:05:52 +0000 (12:05 +0300)
src/agent/subagents/winnt/net.cpp

index 30d3f87..a7196f7 100644 (file)
@@ -230,7 +230,7 @@ LONG H_InterfaceList(const TCHAR *cmd, const TCHAR *arg, StringList *value, Abst
                   for(IP_ADAPTER_PREFIX *p = iface->FirstPrefix; p != NULL; p = p->Next)
                   {
                      InetAddress prefix = InetAddress::createFromSockaddr(p->Address.lpSockaddr);
-                     prefix.setMaskBits(p->Length);
+                     prefix.setMaskBits(p->PrefixLength);
                      if (prefix.contain(addr))
                      {
                         addr.setMaskBits(prefix.getMaskBits());