Skip to content
Snippets Groups Projects
  1. May 04, 2022
  2. Feb 21, 2022
  3. Feb 07, 2022
  4. Jun 09, 2021
  5. Mar 18, 2021
  6. Jan 28, 2021
  7. Oct 21, 2020
    • Jose Juan Iglesias's avatar
      We have several virtual windows servers (vmware virtual machines) each of · 5a9420fb
      Jose Juan Iglesias authored
      which configured with two VMXNET3 interfaces. One of this interfaces
      belongs to an isolated LAN: it hasn't got gateway configuration.
      When these servers transmit their inventories to the OCS server, all of
      them provide this kind of wrong network information:
              <NETWORKS>
                  <DESCRIPTION>vmxnet3 Ethernet Adapter</DESCRIPTION>
                  <TYPE>Ethernet</TYPE>
                  <TYPEMIB>ethernetCsmacd</TYPEMIB>
                  <SPEED>1 Gb/s</SPEED>
                  <MACADDR>omitted</MACADDR>
                  <STATUS>Up</STATUS>
                  <IPADDRESS>10.1.1.93</IPADDRESS>
                  <IPMASK>255.255.255.0</IPMASK>
                  <IPGATEWAY>10.1.1.254</IPGATEWAY>
                  <IPSUBNET>10.1.1.0</IPSUBNET>
                  <IPDHCP />
                  <MTU />
              </NETWORKS>
              <NETWORKS>
                  <DESCRIPTION>vmxnet3 Ethernet Adapter #2</DESCRIPTION>
                  <TYPE>Ethernet</TYPE>
                  <TYPEMIB>ethernetCsmacd</TYPEMIB>
                  <SPEED>1 Gb/s</SPEED>
                  <MACADDR>omitted</MACADDR>
                  <STATUS>Up</STATUS>
                  <IPADDRESS>172.16.16.93</IPADDRESS>
                  <IPMASK>255.255.255.0</IPMASK>
                  <IPGATEWAY>10.1.1.254</IPGATEWAY>
                  <IPSUBNET>10.1.1.0</IPSUBNET>
                  <IPDHCP />
                  <MTU />
              </NETWORKS>
      As you can see, the latter adapter appears as having the same gateway and
      mask as those of the former.
      After some testing with the code of the Agent, we saw that these interfaces are
      precessed by the function CIPHelper::GetNetworkAdapters one after the other, and
      the values of the object cAdapter are not reset anywhere before the end of the loop.
      So the information not provided by the second interface doesn't update those corresponding
      fields which already hold information belonging to the first interface. (AF_INET family)
      
      Besides, also in the case of AF_INET family, the determination of the subnet mask of an
      interface depends on its having a gateway configured. If an interface doesn't have gateway,
      the code won't get its subnet mask. We have moved the code that determines the mask outside
      the gateway condition.
      5a9420fb
  8. Sep 11, 2020
  9. Sep 07, 2020
  10. Sep 04, 2020
  11. Sep 03, 2020
  12. Sep 01, 2020
  13. Jul 28, 2020
  14. Jul 24, 2020
Loading